Follow the steps below in order. Run the CLI commands in the VS Code terminal; the EC2 instance used as the working environment is deleted at the very end.
cfn-aws-three-tier-demo stack.
Enter cfn-aws-three-tier-demo

Wait until the cfn-aws-three-tier-demo stack reaches DELETE_COMPLETE before you continue:
aws cloudformation wait stack-delete-complete --stack-name cfn-aws-three-tier-demo
Delete the cfn-vpc-demo stack and wait for the deletion to finish:
aws cloudformation delete-stack --stack-name cfn-vpc-demo
aws cloudformation wait stack-delete-complete --stack-name cfn-vpc-demo

cfn-lambda-demo stack.
Wait for the deletion to finish.
Delete the log group created when you tested the Lambda function (if it exists):
aws cloudformation delete-stack --stack-name cfn-lambda-demo
aws cloudformation wait stack-delete-complete --stack-name cfn-lambda-demo
aws logs delete-log-group --log-group-name /aws/lambda/CfnLambdaDemo

cfn-aws-three-tier-demo stack is deleted, RDS creates a final snapshot of the demo-database database.
Find and delete this snapshot:
aws rds describe-db-snapshots --db-instance-identifier demo-database --query "DBSnapshots[].DBSnapshotIdentifier" --output text
aws rds delete-db-snapshot --db-snapshot-identifier <snapshot_id>

cf-templates- to store the template.
Find and delete this bucket:
aws s3 ls | grep cf-templates
aws s3 rb s3://<cf_templates_bucket_name> --force

Only delete the cf-templates- bucket if it is no longer used by other CloudFormation stacks in your account.
cfn-keypair key pair.
Delete the cfn-keypair.pem file on your computer:
aws ec2 delete-key-pair --key-name cfn-keypair

cfn-workspace-ec2 instance.
launch-wizard-<n>).
cfn-workspace-key key pair.cfn-workspace-key.pem file.Host cfn-workspace entry from the ~/.ssh/config file.
IaC-Role role.
Congratulations on completing the Introduction to Infrastructure as Code with AWS CloudFormation workshop.