AWS Certified DevOps Engineer – Professional — Question 152
A DevOps engineer is using AWS CodePipeline and AWS CodeBuild to create a CI/CD pipeline for a serverless application that is based on the AWS Serverless Application Model (AWS SAM). The source, build and test steps have been completed. The DevOps engineer has also created two pipeline deployment stages that use AWS CloudFormation as the action provider. One stage uses the "Create or replace a change set" action mode. The other stage uses the "Execute a change set" action mode.
The DevOps engineer needs to pass some parameters to a CloudFormation stack during the deployment without changing the code and pipeline structure.
Which solution will meet these requirements?
Answer options
- A. Set the –parameter-overrides option in the sam deploy command when the CodeBuild stage is invoked.
- B. Add all parameters in AWS Systems Manager Parameter Store. Use dynamic references to specify template values in Parameter Store.
- C. In the deployment stage where the "Create or replace a change set" action mode resides, apply the JSON object in the ParameterOverrides property.
- D. In the deployment stage where the "Execute a change set" action mode resides, apply the JSON object in the ParameterOverrides property.
Correct answer: A
Explanation
The correct answer is A because the –parameter-overrides option in the sam deploy command allows for passing parameters directly during the deployment process without modifying the pipeline structure. Options B, C, and D do not meet the requirement of passing parameters during deployment without altering the existing setup, as they involve additional setups or changes to the pipeline stages.