You have an existing CloudFormation stack with several resources. You update the stack by uploading a new template that no longer includes one of the original resources. What is the expected behavior?
Think about how CloudFormation manages resources when they are removed from the template.
When a resource is removed from a CloudFormation template during an update, CloudFormation deletes that resource from the stack and your AWS account, unless you have specified a deletion policy to retain it.
You want to delete a CloudFormation stack but keep certain resources intact in your AWS account. Which deletion policy should you apply to those resources?
Consider which policy tells CloudFormation to keep the resource even if the stack is deleted.
The 'Retain' deletion policy tells CloudFormation to keep the resource in your AWS account when the stack is deleted. 'Snapshot' creates a backup before deletion, 'Delete' removes the resource, and 'Protect' is not a valid deletion policy.
To delete a CloudFormation stack, which IAM permission must a user have?
Check the exact AWS IAM action name for deleting stacks.
The correct IAM permission to delete a CloudFormation stack is 'cloudformation:DeleteStack'. The other options are not valid IAM actions.
You need to update a CloudFormation stack that runs a web application. Which approach minimizes downtime during the update?
Think about how to safely apply changes with visibility before execution.
Using Change Sets allows you to preview the impact of changes before applying them, reducing the risk of downtime. Deleting the stack causes downtime, updating without preview risks errors, and manual updates break stack management.
You have an Amazon RDS instance defined in a CloudFormation stack with the 'DeletionPolicy' attribute set to 'Snapshot'. What happens to the RDS instance when you delete the stack?
Consider what the 'Snapshot' deletion policy does for stateful resources.
Setting 'DeletionPolicy' to 'Snapshot' causes CloudFormation to create a snapshot of the resource before deleting it, preserving data. The resource is then deleted. 'Retain' would keep the resource, and deletion does not fail due to this policy.