In this example, I create a simple CloudFormation template that deploys a public read S3 bucket.
.
├── README.md
└── bucket.YAML # CloudFormation template
aws cloudformation deploy --template-file ./bucket.YAML --stack-name demo-public-s3-bucket
aws cloudformation update-stack --template-body file://./bucket.YAML --stack-name demo-public-s3-bucket
aws s3 rm s3://demo-public-s3-bucket --recursive
aws cloudformation delete-stack --stack-name demo-public-s3-bucket