Skip to content
ffmpeg timelapse lambda with s3
JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
README.md
create-aws-lambda
delete-aws-lambda
deploy-aws-lambda init Aug 29, 2019
flags
index.js
index.test.js
lambda.js
launch-aws-lambda
launch-lambda-example.js
make-aws-lambda-zip
package.json test downloadS3Images Aug 30, 2019

README.md

timelapse-lambda

installation

1. Deploy the ffmpeg-lambda-layer on your Lambda

2. Create an S3 bucket

name it, for example, "garden-snapshots" in the same region as the ffmpeg-lambda-layer

3. Create timelapse lambda

run ./create-aws-lambda by specifying the needed parameters, below you can find an example.

in the same region as above!

./create-aws-lambda \
  --region us-east-1 \
  --lambda Timelapse \
  --role arn:aws:iam::XXXXXXXXXXX:role/lambda_name \
  --ffmpeg arn:aws:lambda:us-east-1:XXXXXXXXXXX:layer:ffmpeg:1

4. update the lambda with the code

specify the region and the lambda name as above and run:

./deploy-aws-lambda \
  --region us-east-1 \
  --lambda Timelapse

usage

npm install and take a look at launch-lambda-example.js:

#!/usr/bin/env node

const AWS = require('aws-sdk')

const region = 'us-east-1'

const apiVersion = 'latest'
const lambda = new AWS.Lambda({ apiVersion, region })
const invokeParams = { FunctionName: 'Timelapse' }

lambda.invoke(invokeParams, (err, data) => {
  console.log(err, data)
})
You can’t perform that action at this time.