AWS Certified Solutions Architect – Professional (SAP-C02) — Question 118

A company is developing a new serverless API by using Amazon API Gateway and AWS Lambda. The company integrated the Lambda functions with API Gateway to use several shared libraries and custom classes.

A solutions architect needs to simplify the deployment of the solution and optimize for code reuse.

Which solution will meet these requirements?

Answer options

Correct answer: D

Explanation

Option D is correct because it allows the packaging of all necessary components (shared libraries, custom classes, and Lambda function code) into a single Docker image, enhancing deployment efficiency and code reuse. Options A and B incorrectly suggest using a Lambda layer with separate deployment packages, which complicates the process. Option C misuses Amazon ECS instead of leveraging Lambda's capabilities directly.