ANS-C01 exam dumps

ANS-C01 practice question 221 of 513

AWS Certified Advanced Networking - Specialty. Expert level, Amazon Web Services. Free question with the correct answer and a full explanation.

ANS-C01 Question 221

Single answer

Your organization is deploying a multi-region architecture using AWS CloudFormation to automate the infrastructure setup. During deployment, you want to ensure that resources in one region are created only after a specific set of resources in another region have been successfully deployed. Which approach should you take to achieve this dependency management across regions?

  1. A

    Use AWS CloudFormation StackSets and define the inter-region dependencies within the stack template.

  2. B

    Create an exported output in the CloudFormation stack of the first region and use the Fn::ImportValue function in the stack of the second region.

  3. C

    Use AWS Step Functions to orchestrate the deployment of CloudFormation stacks in each region with dependency rules.

  4. D

    Combine AWS CloudFormation with AWS Lambda to manually check the status of the first stack before proceeding to deploy in the second region.

Show answer and explanation

Correct answer: B

Explanation

To manage dependencies across regions in AWS CloudFormation, you can use the Fn::ImportValue function to import exported outputs from one stack in a region to another stack in a different region. This approach ensures that resources in one region are created only after the required resources in another region are successfully deployed. It leverages AWS CloudFormation's native capabilities without requiring additional services or custom code.

  • A. Incorrect.

    StackSets allow you to deploy stacks across multiple accounts and regions, but they do not inherently handle inter-region dependencies. Dependencies must be manually managed.

  • B. Correct.

    Using Fn::ImportValue with exported outputs allows you to pass values from one CloudFormation stack to another, even across regions, enabling dependency management.

  • C. Incorrect.

    AWS Step Functions can be used for orchestration, but this approach is unnecessary for simple inter-region dependency management, which can be handled natively within CloudFormation.

  • D. Incorrect.

    While this approach could work, it introduces unnecessary complexity by requiring custom code to monitor stack statuses, which is not an AWS-recommended best practice for automation.

Timed practice exam

Take a ANS-C01 practice test under exam conditions

65 questions in 170 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam