Amazon

ANS-C01 practice question 19

AWS Certified Advanced Networking - Specialty (ANS-C01) · free question 19 of 20

Question

A network engineer must develop an AWS CloudFormation template that can create a virtual private gateway, a customer gateway, a VPN connection, and static routes in a route table. During testing of the template, the network engineer notes that the CloudFormation template has encountered an error and is rolling back. What should the network engineer do to resolve the error?
  • A. Change the order of resource creation in the CloudFormation template.
  • B. Add the DependsOn attribute to the resource declaration for the virtual private gateway. Specify the route table entry resource.
  • C. Add a wait condition in the template to wait for the creation of the virtual private gateway.
  • D. Add the DependsOn attribute to the resource declaration for the route table entry. Specify the virtual private gateway resource. Correct

Explanation

The correct answer is D because, according to AWS documentation, when creating interdependent resources in CloudFormation, such as a route table entry that depends on a virtual private gateway (VGW), you must use the DependsOn attribute. This ensures that the route table entry is created only after the VGW is successfully established.

Need the theory? Learn it free in the ANS-C01 course on Godlike Academy

Practice the whole free set

Answer all 20 free ANS-C01 questions with instant feedback, or unlock all 296 questions with Learn and Exam modes.