AWS Certified Developer – Associate — Question 348

A logistics company built an asset-tracking microservice by using the AWS Serverless Application Model (AWS SAM). One of the microservice’s AWS Lambda functions needs to import a large geospatial dataset from Amazon S3 before the function can process the requests. The import of the dataset requires significant time and is causing the function to take too long to finish running. The results are increased latency and cost.

A developer needs to optimize the function to process requests faster with the least possible cost.

Which solution will meet these requirements?

Answer options

Correct answer: C

Explanation

Initializing the Amazon S3 SDK and downloading the dataset outside of the Lambda handler allows the data to be retrieved during the initialization phase and retained in memory for subsequent warm starts. Combining this with provisioned concurrency ensures that execution environments are pre-warmed before requests arrive, completely eliminating cold-start latency associated with the large file download. Mounting Amazon EFS introduces unnecessary filesystem overhead and configuration complexity, while simply increasing memory limit to 1,769 MB does not solve the cold-start retrieval delay.