Exam Guide: Developer - Associate ποΈ Domain 1: Development with AWS Services π Task 2: Develop Code for Lambda Lambda is the most heavily tested service on the DVA-C02. It is also perhaps, one of the most used and talked about services in general too, well after EC2 and S3. So, you need to know how to configure it, write code for it, handle errors, tune performance, and integrate it with practically every other AWS service. πConcepts Lambda Execution Model When you invoke a Lambda function, AWS: 1. Finds or creates an execution environment (container) 2. Loads your code and initializes it ( cold start ) 3. Runs your handler function 4. Keeps the environment warm for reuse (subsequent invocations skip step 2) Code outside the handler runs once during cold start and is reused. This is why you initialize SDK clients and database connections outside the handler.β¦