AWS Certified Developer – Associate (DVA-C02) — Question 259
A developer works for a company that only has a single pre-production AWS account with an AWS CloudFormation AWS Serverless Application Model (AWS SAM) stack. The developer made changes to an existing AWS Lambda function specified in the AWS SAM template and additional Amazon Simple Notification service (Amazon SNS) topics.
The developer wants to do a one-time deploy of the changes to test if the changes are working. The developer does not want to impact the existing pre-production application that is currently being used by other team members as part of the release pipeline.
Which solution will meet these requirements?
Answer options
- A. Use the AWS SAM CLI to package and deploy the SAM application to the pre-production AWS account. Specify the debug parameter.
- B. Use the AWS SAM CLI to package and create a change set against the pre-production AWS account. Execute the change set in a new AWS account designated for a development environment.
- C. Use the AWS SAM CLI to package and deploy the SAM application to a new AWS account designated for a development environment.
- D. Update the CloudFormation stack in the pre-production account. Add a separate stage that points to a new AWS account designated for a development environment.
Correct answer: C
Explanation
The correct answer is C because deploying the changes to a new AWS account designated for development ensures that the existing pre-production application remains unaffected during testing. Options A and D would potentially disrupt the current application, while B involves unnecessary complexity with change sets instead of a direct deployment.