1.0.5 • Published 2 years ago
serverless-remotion-lambda v1.0.5
serverless-remotion-lambda
A serverless framework plugin to automate deployment of remotion on AWS lambda
Installation
First, add Serverless Remotion Lambda to your project:
yarn add --dev serverless-remotion-lambda
# or
npm install -D serverless-remotion-lambdaThen inside your project's serverless.yml file add following entry to the plugins section: serverless-remotion-lambda. If there is no plugin section you will need to add it to the file.
plugins:
- serverless-remotion-lambdaConfigure
serverless.yml
custom:
remotion:
lambda:
architecture: arm64
createCloudWatchLogGroup: true
memorySizeInMb: 2048
timeoutInSeconds: 240
entryPoint: ./src/remotion/index.tsx
deployStage: prod
deployRegions:
- us-west-2
timeoutInSeconds: 20
bucketName: null
siteId: remotion-render-app-${remotion.version}Notes:
entryPoint, deployStage, deployRegionsare mandatory.- bucketName:
nullto create new,remotionlambda-{name}to use your own.
- can ref to s3 bucket name in stack
- siteId: will append
{remotion.version}automatically to the name
Remotion Lambda
This plugin uses the official remotion-lambda packages \
remotion-lambda \
remotion-lambda-docs
Side notes
this plugin will automatically add the following resources in your AWS account:
- Role policy:
remotion-lambda-policy - Role:
remotion-lambda-role - User:
remotion-user - Inline user policy:
remotion-user-policy - Temporally will add
AccessTokento the created user to deploy the lambda function - CloudWatch log group
- S3 bucket
- Lambda For further information see remotion-lambda-docs