This sample requires the LambdaSharp CLI to deploy.
This LambdaSharp module creates a Lambda function that converts videos to animated GIFs. The conversion is done by the FFmpeg application which is deployed as a Lambda Layer. The module uses two S3 buckets: one for uploading videos and one for storing the converted animated GIFs. The Lambda function is automatically invoked when a file is uploaded the video S3 bucket.
This module is compiled to CloudFormation and deployed using the LambdaSharp CLI.
git clone https://github.com/LambdaSharp/GifMaker-Sample.git
cd GifMaker-Sample
lash deploy
- Compress contents of
Assets/FFmpeg-Layer
folder into a zip package with execution permissions forffmpeg
executable. - Create a Lambda layer using the uploaded package.
- Create Lambda function
- (Optional) Create an S3 bucket for uploading videos.
- (Optional) Create an S3 bucker for storing the converted animated GIFs.
VideoBucket
-
The
VideoBucket
parameter can optionally be provided to specify the ARN of an existing S3 bucket where video will be uploaded. A new S3 bucket is automatically created when this parameter is omitted.Required: No
Type: String (S3 Bucket ARN)
AnimatedGifBucket
-
The
AnimatedGifBucket
parameter can optionally be provided to specify the ARN of an existing S3 bucket where the converted animated GIF files are uploaded to. A new S3 bucket is automatically created when this parameter is omitted.Required: No
Type: String (S3 Bucket ARN)
The FFmepg application is provided by https://www.ffmpeg.org/
Apache 2.0 for the module and code.
GPL 3.0 for the files in the Assets/FFmpeg-Layer
folder.