DVA-C02 · Question #209
A company has developed a new serverless application using AWS Lambda functions that will be deployed using the AWS Serverless Application Model (AWS SAM) CLI. Which step should the developer complete
The correct answer is C. Bundle the serverless application using a SAM package.. Why C is correct: Before deploying with AWS SAM CLI, you must run sam package (or sam build then sam package) to bundle your application artifacts, upload them to an S3 bucket, and generate a packaged CloudFormation template - this is a required prerequisite step before sam deplo
Question
A company has developed a new serverless application using AWS Lambda functions that will be deployed using the AWS Serverless Application Model (AWS SAM) CLI. Which step should the developer complete prior to deploying the application?
Options
- ACompress the application to a .zip file and upload it into AWS Lambda.
- BTest the new AWS Lambda function by first tracing it in AWS X-Ray.
- CBundle the serverless application using a SAM package.
- DCreate the application environment using the eb create my-env command.
How the community answered
(36 responses)- A6% (2)
- C92% (33)
- D3% (1)
Explanation
Why C is correct: Before deploying with AWS SAM CLI, you must run sam package (or sam build then sam package) to bundle your application artifacts, upload them to an S3 bucket, and generate a packaged CloudFormation template - this is a required prerequisite step before sam deploy can work.
Why the distractors are wrong:
- A is wrong because manually zipping and uploading to Lambda bypasses SAM entirely; SAM automates this packaging process for you.
- B is wrong because X-Ray is a tracing/monitoring tool used after deployment, not a prerequisite step before it.
- D is wrong because
eb createis an Elastic Beanstalk command, which is a completely different service unrelated to SAM or Lambda.
Memory tip: Think of the SAM workflow as Build → Package → Deploy. The word "prior to deploying" is your cue to look for the step that comes just before sam deploy - that's always sam package, which stages your artifacts in S3 and transforms the template.
Topics
Community Discussion
No community discussion yet for this question.