DOP-C02 Question 131
Select 3You are managing a multi-account AWS environment and want to automate the deployment of infrastructure across all accounts using Infrastructure as Code (IaC) principles. The solution should allow for consistent and repeatable deployments while enabling you to interact with AWS resources programmatically. Which combination of methods and strategies should you use to achieve this?
- A
Use AWS CloudFormation StackSets to deploy resources across multiple accounts and regions.
- B
Leverage AWS Systems Manager Parameter Store for securely managing configuration values and secrets.
- C
Use AWS CLI scripts to manually deploy resources in each account, ensuring consistency through custom scripting.
- D
Adopt AWS CDK (Cloud Development Kit) to define infrastructure in familiar programming languages and deploy it programmatically.
- E
Utilize EC2 User Data to deploy and manage infrastructure across accounts.
Show answer and explanation
Correct answers: A, B, D
Explanation
The correct combination of methods includes AWS CloudFormation StackSets, AWS Systems Manager Parameter Store, and AWS CDK. These tools align with Infrastructure as Code (IaC) principles, enabling consistent and automated infrastructure deployments across multiple accounts. AWS CLI scripts and EC2 User Data do not provide the scalability, repeatability, or manageability required for a multi-account environment.
- A. Correct.
AWS CloudFormation StackSets are specifically designed to automate and manage infrastructure deployment across multiple accounts and regions, making it a suitable choice for this scenario.
- B. Correct.
AWS Systems Manager Parameter Store allows for secure and centralized management of configuration parameters and secrets, which is essential for consistent automation across accounts.
- C. Incorrect.
While the AWS CLI can automate resource deployment to some extent, relying solely on CLI scripts for manual deployments across accounts is error-prone and does not align with IaC principles.
- D. Correct.
AWS CDK enables you to define and deploy infrastructure using common programming languages, making it a powerful tool for programmatically managing AWS resources.
- E. Incorrect.
EC2 User Data is primarily used for bootstrapping individual EC2 instances and is not a scalable or recommended approach for managing AWS infrastructure across multiple accounts.