AWS Certified SysOps Administrator – Associate (legacy) — Question 306
A user is using Cloudformation to launch an EC2 instance and then configure an application after the instance is launched. The user wants the stack creation of
ELB and AutoScaling to wait until the EC2 instance is launched and configured properly. How can the user configure this?
Answer options
- A. It is not possible that the stack creation will wait until one service is created and launched
- B. The user can use the HoldCondition resource to wait for the creation of the other dependent resources
- C. The user can use the DependentCondition resource to hold the creation of the other dependent resources
- D. The user can use the WaitCondition resource to hold the creation of the other dependent resources
Correct answer: D
Explanation
In AWS CloudFormation, the AWS::CloudFormation::WaitCondition resource is used to pause the creation of dependent resources (like ELB and AutoScaling) until a success signal is received from an external source, such as a script running on an EC2 instance. This allows the stack to wait until the instance is fully configured before proceeding. Other options like HoldCondition and DependentCondition are not valid AWS CloudFormation resources.