There are two types of invocation for Lambda:

  • Request/Response
  • Asynchronous invoaction

 

Demo by using AWS CLI:

Request/Response

aws lambda invoke --function-name hello-world \
--invocation-type RequestResponse \
--log-type Tail --payload '{"name": "AWSLambda"}' \
result.txt

It will also output a file called result.txt to save the response.

[AWS] Lambda Invocation types

 

Asynchronous Invocation

aws lambda invoke --function-name hello-world \
--invocation-type Event \
--log-type Tail --payload '{"name": "AWS Lambda"}' \
result.txt

Becasue it is asyn, it won't output the response.

[AWS] Lambda Invocation types

 

Error Handling

[AWS] Lambda Invocation types

相关文章:

  • 2022-01-01
  • 2021-11-23
  • 2022-12-23
  • 2021-08-30
  • 2022-02-16
  • 2021-11-03
  • 2021-11-18
  • 2021-05-22
猜你喜欢
  • 2021-08-07
  • 2022-12-23
  • 2021-10-16
  • 2022-02-05
  • 2021-11-23
  • 2021-11-02
  • 2021-05-28
相关资源
相似解决方案