AWS Certified Developer – Associate (DVA-C02) — Question 413
A developer has built an application running on AWS Lambda using AWS Serverless Application Model (AWS SAM).
What is the correct sequence of steps to successfully deploy the application?
Answer options
- A. 1. Build the SAM template in Amazon EC2. 2. Package the SAM template to Amazon EBS storage. 3. Deploy the SAM template from Amazon EBS.
- B. 1. Build the SAM template locally. 2. Package the SAM template onto Amazon S3. 3. Deploy the SAM template from Amazon S3.
- C. 1. Build the SAM template locally. 2. Deploy the SAM template from Amazon S3. 3. Package the SAM template for use.
- D. 1. Build the SAM template locally. 2. Package the SAM template from AWS CodeCommit. 3. Deploy the SAM template to CodeCommit.
Correct answer: B
Explanation
The standard AWS SAM deployment workflow requires building the application artifacts locally (using 'sam build'), packaging the local deployment artifacts and uploading them to an Amazon S3 bucket (using 'sam package'), and finally deploying the template from Amazon S3 using AWS CloudFormation (via 'sam deploy'). Other storage services like Amazon EBS or AWS CodeCommit are not used to store the packaged deployment artifacts for AWS SAM.