serverless-remotion-lambda

1.0.5 • Public • Published

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-lambda

Then 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-lambda

Configure

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, deployRegions are mandatory.
  • bucketName: null to 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 AccessToken to the created user to deploy the lambda function
  • CloudWatch log group
  • S3 bucket
  • Lambda

    For further information see remotion-lambda-docs

Package Sidebar

Install

npm i serverless-remotion-lambda

Weekly Downloads

5

Version

1.0.5

License

MIT

Unpacked Size

18 kB

Total Files

6

Last publish

Collaborators

  • hammersi