Functions, runtimes, sources, and resources

A function in Lambda always processes some kind of input data, be it an event or any other type of trigger that can invoke the Lambda function from an event source. An event source can be another AWS service, or from any other compatible source inside or outside AWS. When configuring a Lambda function, we always need to define a runtime, as this will ensure that the appropriate programming language support is available in the Lambda execution environment.

Once the event source invokes a function, the execution starts and a Lambda function that is running will push out metrics and optionally any kind of application log output to a log stream. Log streams are stored in CloudWatch and give us the ability to analyze the performance and learn the characteristics of our Lambda functions so we can optimize them and achieve peak performance.

Once the function completes its task, the output is either returned to the requester or stored in so-called downstream resources. Downstream resources can be any type of environment that Lambda can write to, such as an S3 bucket for outputting files, DynamoDB to output key-value pairs, another Lambda function to perform additional processing, and so on.

The Lambda invocation architecture is displayed in the following diagram:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.233.205