CloudFormation Features: Part II
Build on your understanding of CloudFormation by understanding more of its core features.
CreatePolicy
The CreatePolicy attribute can be used with a resource to prevent its status from reaching the create complete state until AWS CloudFormation receives a certain number of signals from the resource. The CreatePolicy attribute is only supported by the following resource types:
AWS::AppStream::FleetAWS::AutoScaling::AutoScalingGroupAWS::EC2::InstanceAWS::CloudFormation::WaitCondition
In the following code, we have a resource, EducativeASG, with desired capacity 3. We’ve associated a creation policy with this ASG to ensure that CloudFormation receives three SUCCESS signals, one from each of the ASG instances.
UpdatePolicy
We can use UpdatePolicy to specify how CloudFormation should update a resource. The UpdatePolicy attribute is supported for the following resource types in CloudFormation:
AWS::AppStream::FleetAWS::AutoScaling::AutoScalingGroupAWS::ElastiCache::ReplicationGroupAWS::OpenSearchService::Domain