‫Now let's have a detailed look
‫at the first type of invocation for
‫lambda functions that we've already been using,
‫called the synchronous invocation.
‫So you're doing a synchronous invocation
‫when you're using the CLI, and the SDK,
‫the API Gateway, or even an
‫Application Load Balancer.
‫What does that mean by synchronous?
‫that means that you're waiting for the results,
‫and then the result will be returned to you.
‫And any errors that come backs to you
‫must be handled on the client side.
‫That means that if my lambda function fails,
‫and I just invoked it from the console,
‫I want to click on the retry button to retry it.
‫So that means that any time there is an error
‫on lambda, the client has to figure out what to do.
‫Do you want to retry it, do you want to do an
‫exponential backoff, etc etc.
‫So synchronous means a direct invocation
‫that you weight the result of.
‫So the CLI and the SDK would just invoke
‫our lambda function, the lambda function would
‫do something, and give us our response.
‫This is the same when we'll use the API Gateway
‫in the future sections, so the clients will invoke
‫the API Gateway, the API Gateway will proxy its
‫request to the lambda function, so it will
‫invoke the lambda function for you; the lambda function
‫will give the response to your API Gateway,
‫which will give you the response.
‫And so in this schema, we're just waiting for
‫the response that makes it a synchronous type of
‫invocation.
‫So, what services are synchronous with lambda?
‫Well, first of all, any time it's user-invoked
‫then it's going to be synchronous.
‫So: Elastic Load Balancing through the
‫Application Load Balancer, the API Gateway,
‫CloudFront with Lambda@Edge that we'll see.
‫Anything in bold right now is stuff we'll see
‫in this course, and anything not in bold
‫will not be seen in this course.
‫So Amazon S3 Batch; all the services,
‫such as Cognito, Step Functions, and other services:
‫Lex, Alexa, and Kinesis Data Firehose.
‫So in this section we're going to see
‫Application Load Balancer, API Gateway,
‫CloudFront, we'll see Cognito and Step Functions,
‫in their respective sections.
‫Okay.
‫So, now that we know what services invoke a
‫lambda function synchronously, let's have a play
‫with the hands on.