Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Invocation Models

Pragya Keshap answered on February 21, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


Invocation Models

0

Function invocation happens in 3 different ways:

Event Source Mapping / Stream Model ( Poll Based )

for example from SQS, Kinesis Data Streams, DynamoDB Streams (event source mapping for these sources is defined on the Lambda itself)

Lambda Service takes care of polling the sources on your behalf and consuming the messages then invoking your Lambda Function when messages match your use case.

Synchronous ( Push Based ) :

for example from API Gateway, CLI, SDK

request-response model, after Lambda receives a request, it sends back the response of its executions.

Error handling happens client sides ( retries, exponential backoffs etc)

Asynchronous ( Event Based )

for example from S3, SNS, CloudWatch events,

response is not sent back to the original service that invoked the Lambda function. (you can although, configure Destinations to send the results of the invocations to other services like SNS, SQS, EventBridge or other Lambdas)

up to 3 automatic retries

since code will be retried, it must be idempotent!

This type of invocation has little to do with the fact the lambda contains asynchoronous code ( like async await or promises ) rather to the fact that the service invoking the lambda is actually expecting a response for further processing.

Popularity 1/10 Helpfulness 1/10 Language whatever
Source: Grepper
Link to this answer
Share Copy Link
Contributed on Feb 21 2023
Pragya Keshap
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.