Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1006 Bytes

cloudformation.md

File metadata and controls

50 lines (33 loc) · 1006 Bytes

cloudformation

Today I learnt ...

... how to create a stack programatically and clean up

2023-12-18T17:00:11+00:00

Create a stack for a public S3 bucket and remove it

Resources

Prerequisites

Recipe

  1. Save this CloudFormation template to a file howapped-storage-bucket.yml

    AWSTemplateFormatVersion: "2010-09-09"
    Description: Welcome to Howapped Storage
    Resources:
    	HowappedStorageBucket:
    	Type: "AWS::S3::Bucket"
    
  2. Create the stack

    aws cloudformation create-stack --stack-name howapped-storage-bucket --template-body file://howapped-storage-bucket.yml
  3. Check it exists

    aws s3 ls | grep howapped-storage-bucket
  4. Delete it

    aws cloudformation delete-stack --stack-name howapped-storage-bucket