AWS Certified SysOps Administrator – Associate — Question 8

A company uses an AWS CloudFormation template to provision an Amazon EC2 instance and an Amazon RDS DB instance. A SysOps administrator must update the template to ensure that the DB instance is created before the EC2 instance is launched.
What should the SysOps administrator do to meet this requirement?

Answer options

Correct answer: B

Explanation

The correct answer is B, as the DependsOn attribute explicitly defines the creation order of resources, ensuring the RDS instance is provisioned before the EC2 instance. Option A is incorrect because a wait condition does not guarantee the order of resource creation. Option C is also incorrect; the order of declaration in the template does not establish dependency. Option D is unnecessary complexity for this requirement.