DEA-C01 Question 126
Single answerYou are a data engineer tasked with deploying an Amazon Redshift cluster along with its associated IAM roles and security groups. Your team requires the deployment to be repeatable with minimal manual intervention. Which approach should you use to achieve this?
- A
Manually create the Redshift cluster, IAM roles, and security groups using the AWS Management Console.
- B
Write a script using the AWS SDK to programmatically create the Redshift cluster, IAM roles, and security groups.
- C
Use AWS CloudFormation to define the infrastructure as code and deploy it through a CloudFormation stack.
- D
Use an AWS Lambda function to automate the creation of the Redshift cluster, roles, and security groups at runtime.
Show answer and explanation
Correct answer: C
Explanation
AWS CloudFormation is the best solution for this scenario as it allows you to define your infrastructure as code in a declarative manner. This ensures repeatability, scalability, and minimal manual intervention. It integrates seamlessly with AWS services like Amazon Redshift, IAM, and security groups, making it the most efficient and reliable choice for deploying infrastructure.
- A. Incorrect.
Manually creating resources is not repeatable or efficient for large-scale deployments, leading to potential human error and inconsistency.
- B. Incorrect.
While writing a custom script with the AWS SDK can work, it requires significant effort to build, maintain, and handle dependencies, and it does not leverage AWS native IaC tooling.
- C. Correct.
AWS CloudFormation is an Infrastructure as Code (IaC) service that enables you to define and deploy AWS resources in a repeatable and automated manner, meeting the requirements of the scenario.
- D. Incorrect.
Using AWS Lambda for this task introduces unnecessary complexity and is not designed for defining and managing infrastructure as code.