CloudFormation
Owner | |
---|---|
Verification | |
Tags | |
Last edited time |
Retain data on stack deletion: configure the Deletion Policy to: Delete / Retain / Snapshot.
Can provision Custom Resources using Lambda for On-Premise or encrypted S3 resources, can use this to delete non empty S3 buckets.
StackSets to deploy stacks across multiple accounts and regions in a single deployment, in ORG can be triggered with Auto Deployment for new account.
Drift detection to identify manual conf changes in deployed resources.
works with SSM Secrets manager to pull passwords
can import existing resources into a new template - nested stacks
Use the AWS CDK to define your cloud resources in a familiar programming language. The AWS CDK supports TypeScript, JavaScript, Python, Java, and C#/.Net. Developers can use one of the supported programming languages to define reusable cloud components known as Constructs.
- Cfn-signal = verifies the status check of an EC2 instance
- Wait. Condition - wait for a response from the OS wait on resource configuration actions before stack creation proceeds
- Timeout - the length of time that CloudFormation waits for the number of signals that were specified in the Count property.
- Cfn-init - add users, install apps, create files
During the boot the service will query the cfn-init, we add a wait condition that will block the template until it receives a signal from the cfn-signal
Cfn-signal runs after the cfn-init and verifies that all is well
We need to define a wait condition that will Block the template until it receives a signal from the cfn-signal:
Launch > retrieve -data > Signal > run cfn-init
Deletion policy:
- Delete: deletes the resource and all its content if applicable during stack deletion. You can add this deletion policy to any resource type.
- Retain: keeps the resource when its stack is deleted.
- Snapshot: creates a snapshot for the resource before deleting it.
Helper Scrips
- Wait. Condition - wait for a response from the OS
- Creation Policy - wait on resource configuration actions before stack creation proceeds (install and configure software or applications on an EC2)
- Timeout - the length of time that CloudFormation waits for the number of signals that were specified in the Count property.
- Cfn-init - add users, install apps, create files:
Better way to add user data - a script that helps to make complex EC2 configuration.
- Cfn-signal = verifies the status check of an EC2 instance
During the boot the service will query the cfn-init, we add a wait condition that will block the template until it receives a signal from the cfn-signal
Cfn-signal & wait conditions
Cfn-signal runs after the cfn-init and verifies that all is well
We need to define a wait condition that will Block the template until it receives a signal from the cfn-signal: Launch > retrieve in it-data > Signal > run cfn-init