AWS Lambda duplicate invocation specifications

0

I would like to clarify the specification that AWS Lambda is invoked multiple times in a single call or event.
However, except in the case of duplicate invocation due to errors.

Are the following specifications correct?
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/lambda-services.html

  1. Synchronous invocation by AWS Lambda
    ex.)
    aws lambda invoke --invocation-type RequestResponse
    
    → Exactly once??.
  2. Asynchronous invocation by AWS Lambda
    ex.)
    aws lambda invoke --invocation-type Event
    
    At least once.
  3. Event-driven; synchronous invocation
    ex.)
    Cognito
    API Gateway(synchronous invocation)
    
    → Exactly once??.
  4. Event-driven; asynchronous invocation
    ex.)
    Cloudwatch Event
    Cloudwatch Logs
    S3
    
    At least once.
  5. Lambda polling1
    ex.)
    SQS(basic)
    
    At least once.
  6. Lambda polling2
    ex.)
    SQS(FIFO)
    DynamoDB(Streasm)
    
    → Exactly once??.
tamura
質問済み 2年前542ビュー
1回答
1
承認された回答

For all the synchronous invocations (1 and 3), the number of invocations depends on the client. If the client invokes the function once, the function will run exactly once.

For asynchronous invocations (2 and 4), events are added to an internal queue and the functions will run at least once.

For polling use cases (5 and 6, but also Kinesis Data streams, DynamoDB streams, MSK and MQ), the invocation is actually synchronous, however, SQS may deliver a message more than once, so the function may run more than once. With FIFO, messages are delivered exactly once, but due to function errors, we may invoke the function more than once. Same for the other cases.

profile pictureAWS
エキスパート
Uri
回答済み 2年前
profile picture
エキスパート
レビュー済み 22日前
  • Hi, Uri. Thank you so much.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ