ANS-C01 · Question #175
ANS-C01 Question #175: Real Exam Question with Answer & Explanation
The correct answer is B: Design the CDK application to read environment variables that contain account and Region. https://docs.aws.amazon.com/cdk/v2/guide/environments.html you can use environment variables to pass in values that vary across environments and Regions. You can use the --context flag when running cdk deploy to set environment variables for the CDK application. You can also use
Question
A team of infrastructure engineers wants to automate the deployment of Application Load Balancer (ALB) components by using the AWS Cloud Development Kit (AWS CDK). The CDK application must deploy an infrastructure stack that is reusable and consistent across multiple environments, AWS Regions, and AWS accounts. The lead network architect on the project has already bootstrapped the target accounts. The lead network architect also has deployed core network components such as VPCs and Amazon Route 53 private hosted zones across the multiple environments and Regions. The infrastructure engineers must design the ALB components in the CDK application to use the existing core network components. Which combination of steps will meet this requirement with the LEAST manual effort between environment deployments? (Choose two.)
Options
- ADesign the CDK application to read AWS CloudFormation parameters for the values that vary
- BDesign the CDK application to read environment variables that contain account and Region
- CCreate a dedicated account for shared application services in the multi-account environment.
- DWrite a script that automates the deployment of the CDK application across multiple
- EUse the CDK toolkit locally to deploy stacks to each environment and Region. Use the --context
Explanation
https://docs.aws.amazon.com/cdk/v2/guide/environments.html you can use environment variables to pass in values that vary across environments and Regions. You can use the --context flag when running cdk deploy to set environment variables for the CDK application. You can also use the CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION environment variables provided by the AWS CDK CLI to specify the target account and Region
Topics
Community Discussion
No community discussion yet for this question.