Once we provide a template to the CloudFormation service, the service stores that template in an S3 bucket. It simultaneously reads the inputs in the template and processes them in parallel. We have to take this into consideration whenever we have resources that need to be created in sequence.
To create resources in sequence, we can implement the CloudFormation DependsOn attribute. The DependsOn attribute gives us the ability to wait for a certain resource to be created before another resource creation is started. For example, we can specify a DependsOn attribute that will wait for an RDS instance to be created and available before it starts an EC2 instance creation.