Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
STACK_NAME ?= ffmpeg-lambda-layer
DEPLOYMENT_PREFIX ?= ""

clean:
clean:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks as though some whitespace was trimmed by my editor; let me know if I should revert these.

rm -rf build

build/layer/bin/ffmpeg:
build/layer/bin/ffmpeg:
mkdir -p build/layer/bin
rm -rf build/ffmpeg*
cd build && curl https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar x
mv build/ffmpeg*/ffmpeg build/ffmpeg*/ffprobe build/layer/bin

build/output.yaml: template.yaml build/layer/bin/ffmpeg
aws cloudformation package --template $< --s3-bucket $(DEPLOYMENT_BUCKET) --output-template-file $@
aws cloudformation package --template $< --s3-bucket $(DEPLOYMENT_BUCKET) --s3-prefix $(DEPLOYMENT_PREFIX) --output-template-file $@

deploy: build/output.yaml
aws cloudformation deploy --template $< --stack-name $(STACK_NAME)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Run the following command to deploy the compiled result as a layer in your AWS a
make deploy DEPLOYMENT_BUCKET=<YOUR BUCKET NAME>
```

You can optionally provide an S3 prefix, e.g.:

```
make deploy DEPLOYMENT_BUCKET=<YOUR BUCKET NAME> DEPLOYMENT_PREFIX=<YOUR PREFIX>
```

### configuring the deployment

By default, this uses `ffmpeg-lambda-layer` as the stack name. Provide a `STACK_NAME` variable when calling `make deploy` to use an alternative name.
Expand Down