Skip to content

Commit

Permalink
added example to run in Lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
gojko committed May 17, 2019
1 parent 0f94b12 commit adb41ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
output.yaml
8 changes: 4 additions & 4 deletions example/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
STACK_NAME ?= imagemagick-layer-example
IMAGE_MAGICK_STACK_NAME ?= imagemagick-layer

IMAGEMAGICK_LAYER ?=(shell aws cloudformation describe-stacks --stack-name $(IMAGE_MAGICK_STACK_NAME) --query Stacks[].Outputs[].OutputValue --output text)
IMAGEMAGICK_LAYER ?=$(shell aws cloudformation describe-stacks --stack-name $(IMAGE_MAGICK_STACK_NAME) --query Stacks[].Outputs[].OutputValue --output text)
SOURCES=$(shell find src/)

clean:
rm -rf build

output.yml: template.yml $(SOURCES)
output.yaml: template.yaml $(SOURCES)
mkdir -p build
aws cloudformation package --template-file $< --output-template-file $@ --s3-bucket $(DEPLOYMENT_BUCKET_NAME)
aws cloudformation package --template-file $< --output-template-file $@ --s3-bucket $(DEPLOYMENT_BUCKET)

deploy: output.yml
deploy: output.yaml
aws cloudformation deploy --template-file $< --stack-name $(STACK_NAME) --capabilities CAPABILITY_IAM --parameter-overrides ImageMagickLayer=$(IMAGEMAGICK_LAYER)
aws cloudformation describe-stacks --stack-name $(STACK_NAME) --query Stacks[].Outputs --output table

File renamed without changes.

0 comments on commit adb41ba

Please sign in to comment.