A stack is created upon the successful execution of a template in CloudFormation. Executing a template creates a defined set of AWS resources. A group of these AWS resources defined in CloudFormation is called a stack. During template execution, if CloudFormation is unable to create any resource, the whole stack creation fails. When a CloudFormation execution fails, it rolls back all of the execution steps and deletes any resources created during the process. CloudFormation execution may fail due to several reasons, including insufficient privileges. Due to limited IAM privileges, if the rollback process is unable to delete the created resources, then the incomplete stack remains in the AWS account until it is deleted by an IAM user with sufficient privileges to delete the stack.
Understanding a stack
At the time of creating a stack from the template, AWS CloudFormation only checks...