AWS Certified Solutions Architect – Professional — Question 542
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. The user can use the DependentCondition resource to hold the creation of the other dependent resources.
- B. It is not possible that the stack creation will wait until one service is created and launched.
- C. The user can use the HoldCondition resource to wait for 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
AWS CloudFormation provides the AWS::CloudFormation::WaitCondition resource to coordinate stack resource creation with external configuration actions. This allows the template to pause the creation of dependent resources like ELB and AutoScaling until the EC2 instance sends a success signal. Resources like DependentCondition and HoldCondition do not exist in AWS CloudFormation.