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년 전530회 조회
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
전문가
검토됨 17일 전
  • Hi, Uri. Thank you so much.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠