Skip to content

Instantly share code, notes, and snippets.

@ritesh
Created July 10, 2020 14:33
Show Gist options
  • Save ritesh/c4e0e8636a8fa459b14c68804d6e82f6 to your computer and use it in GitHub Desktop.
Save ritesh/c4e0e8636a8fa459b14c68804d6e82f6 to your computer and use it in GitHub Desktop.
Makefile for cfn templates
STACK_NAME=MyStack
TEMPLATE_FILE=template.yaml
CAPABILITIES=CAPABILITY_NAMED_IAM
validate:
aws cloudformation validate-template --template-body file://$(TEMPLATE_FILE)
create-stack: validate
aws cloudformation deploy --template-file $(TEMPLATE_FILE) --stack-name $(STACK_NAME) --capabilities $(CAPABILITIES) --parameter-overrides ProjectId=$(STACK_NAME)
describe-stack:
aws cloudformation describe-stacks --stack-name $(STACK_NAME)
aws cloudformation describe-stack-events --stack-name $(STACK_NAME) | less -S
clean:
aws cloudformation delete-stack --stack-name $(STACK_NAME)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment