DEA-C01 Question 128
Single answerYou are tasked with deploying an Amazon Redshift cluster to multiple environments (development, staging, and production) with consistent configurations. The deployment must also allow for environment-specific customizations, such as different node types or security group settings. Which approach should you take to meet these requirements while enabling repeatable and maintainable deployments?
- A
Use AWS Management Console to manually create the cluster in each environment and document the configurations.
- B
Write a single AWS CloudFormation template with parameters for environment-specific values and deploy it using different parameter files for each environment.
- C
Use the AWS CDK to define the cluster infrastructure as code, utilizing environment-specific context values and version control for the code.
- D
Write a shell script that uses the AWS CLI to create the cluster in each environment and hardcode the environment-specific configurations.
Show answer and explanation
Correct answer: B
Explanation
AWS CloudFormation is a powerful IaC tool that allows you to define infrastructure in a declarative manner. By using parameters and parameter files, you can customize deployments for different environments while ensuring consistency. This approach is better suited for repeatable and maintainable deployments compared to manual creation, shell scripts, or other tools that do not inherently support parameterization.
- A. Incorrect.
Manually creating resources in the AWS Management Console is prone to errors, not scalable, and does not provide repeatability or maintainability.
- B. Correct.
Using AWS CloudFormation with parameters allows for consistent deployments across environments while enabling environment-specific customizations through parameter files. This approach is both repeatable and maintainable.
- C. Incorrect.
While the AWS CDK is a valid approach for defining infrastructure as code, it does not inherently provide the same level of abstraction and ease of use for parameterized deployments across environments as AWS CloudFormation.
- D. Incorrect.
Using a shell script and hardcoding configurations is not a best practice, as it lacks version control, scalability, and maintainability. Hardcoding values also increases the risk of errors.