官术网_书友最值得收藏!

Invoking the function

The Lambda CLI provides a command to directly invoke the Lambda function:

$ aws lambda invoke --function-name <value> <outfile> 

Let's look at the parameters:

  • --function-name (required): This parameter asks for a Lambda function name
  • outfile (required): Here, you need to mention a filename where the returned output or response by the Lambda function will be stored

Here are other optional parameters available that you can list by the help command.

Let's invoke our recently created HelloWorldCLI function:

When we invoked the Lambda function, it immediately responded with a status code and the Lambda function returned the output data stored in the newly created lambda_output.txt file by the lambda invoke command.

主站蜘蛛池模板: 光山县| 济阳县| 宁陵县| 汽车| 宣武区| 绩溪县| 土默特右旗| 卓尼县| 广昌县| 康定县| 沧州市| 信阳市| 九台市| 陆良县| 南通市| 易门县| 阳原县| 京山县| 三原县| 临江市| 伽师县| 朔州市| 昌邑市| 大悟县| 丰都县| 卓尼县| 沙湾县| 新宾| 尚志市| 民权县| 漳平市| 获嘉县| 横峰县| 淅川县| 兰考县| 武功县| 太原市| 万荣县| 鹿邑县| 衡水市| 嘉黎县|