DEA-C01 Question 129
Single answerYou are a data engineer responsible for deploying an Amazon EMR cluster as part of your company's data processing pipeline. Your team wants to ensure repeatability and consistency in the infrastructure setup across different environments (development, staging, and production). Additionally, you need the ability to parameterize configurations, such as instance types and cluster size, for different environments. Which approach would best meet these requirements?
- A
Use the AWS Management Console to manually configure and launch the EMR cluster for each environment.
- B
Write a CloudFormation template that defines the EMR cluster and use parameters to customize the configuration for each environment.
- C
Manually write and execute AWS CLI commands to launch the EMR cluster with specific configurations for each environment.
- D
Use the AWS CDK to define the EMR cluster as code, allowing you to leverage programming constructs and parameterize configurations.
Show answer and explanation
Correct answer: B
Explanation
CloudFormation is a native AWS service designed for defining and managing infrastructure as code. By creating a CloudFormation template, you can standardize your infrastructure setup and use parameters to adapt configurations for multiple environments. This ensures consistent and repeatable deployments, which is critical for scenarios involving multiple environments like development, staging, and production.
- A. Incorrect.
Using the AWS Management Console for manual configuration does not ensure repeatability or consistency, as it is prone to human errors and cannot be easily replicated across environments.
- B. Correct.
A CloudFormation template allows you to define your infrastructure as code, ensuring repeatability and consistency. Parameters in the template enable you to customize configurations for different environments, making this the best choice.
- C. Incorrect.
Manually writing and executing AWS CLI commands may allow you to launch the cluster, but it does not provide a repeatable or scalable solution for multiple environments.
- D. Incorrect.
While the AWS CDK can be used to define infrastructure as code, it is not explicitly mentioned in the scenario. The question focuses on the use of CloudFormation for parameterized and repeatable deployments, making this less relevant.