DVA-C02 Question 303
Single answerYou are developing a serverless application using AWS Lambda that processes images uploaded to an Amazon S3 bucket. You want a deployment strategy that allows you to define and manage the infrastructure as code, while also simplifying the creation, testing, and deployment of the Lambda function using pre-built templates. Which AWS tool would best meet these requirements?
- A
AWS CloudFormation
- B
AWS Cloud Development Kit (AWS CDK)
- C
AWS Serverless Application Model (AWS SAM)
- D
AWS Amplify
Show answer and explanation
Correct answer: C
Explanation
AWS SAM (Serverless Application Model) is the best tool for this scenario because it is tailored specifically for serverless applications. It extends AWS CloudFormation with simplified syntax for defining serverless resources and includes features for local testing, packaging, and deploying Lambda functions. While other tools like AWS CloudFormation and AWS CDK can handle serverless deployments, they do not provide the same level of simplicity and serverless-specific capabilities as AWS SAM.
- A. Incorrect.
AWS CloudFormation allows you to define and provision infrastructure as code, but it does not provide serverless-specific templates or tools for simplifying the deployment of Lambda functions.
- B. Incorrect.
AWS CDK allows you to define infrastructure as code using programming languages, but while it supports serverless architectures, it does not provide out-of-the-box serverless-specific features like AWS SAM.
- C. Correct.
AWS SAM is specifically designed for serverless applications and provides pre-built templates, simplified deployment mechanisms, and testing capabilities for AWS Lambda and other serverless resources.
- D. Incorrect.
AWS Amplify is intended for building and deploying full-stack web and mobile applications, and it is not specifically designed for serverless infrastructure management or deployment of Lambda functions.