npx remotion lambda sites create
npx remotion lambda sites create <entry-point>?You may pass an entry point as the first argument, otherwise the entry point will be determined.
Bundle and upload a Remotion video to an S3 bucket.
The result will be a URL such as https://remotionlambda-12345.s3.eu-central-1.amazonaws.com/sites/abcdef/index.html.
If you make changes locally, you need to redeploy the site. Use --site-name to overwrite an existing site.
You can use this "serve URL" to render a video on Remotion Lambda using:
- The
npx remotion lambda renderandnpx remotion lambda stillcommands - The
renderMediaOnLambda()andrenderStillOnLambda()functions. - Locally using the
renderMedia()andrenderStill()functions. - Locally using the
npx remotion renderandnpx remotion stillcommands
If you are rendering on Lambda, you can also pass the site Name (in this case abcdef) as an abbreviation.
Example output
(1/3) [====================] Bundled video 3975ms
(2/3) [====================] Created bucket 457ms
(3/3) [====================] Uploaded to S3 25118ms
Deployed to S3!
Serve URL: https://remotionlambda-12345.s3.eu-central-1.amazonaws.com/sites/abcdef/index.html
Site Name: abcdef
--region
The AWS region in which to run the command.
The project and the Lambda function must use the same region. See how Remotion selects an AWS region.
--site-name
The name to give the site deployed to S3.
The name gives the site a deterministic URL. Deploying again with the same name overwrites the existing site. Can only contain the following characters: 0-9, a-z, A-Z, -, !, _, ., *, ', (, )
npx remotion lambda sites create src/index.ts --site-name=my-project--force-bucket-namev3.3.42
Specify the S3 bucket to use for the command.
Remotion recommends automatic bucket discovery.
--privacyv3.3.97
Set the S3 access control for a deployed site to public or no-acl.
The site must have a public URL so the headless browser can open it. Choose no-acl for buckets that do not accept ACLs.
--public-dirv4.0.140
Define the location of the public/ directory. If not defined, Remotion will assume the location is the public folder in your Remotion root.
--enable-folder-expiryv4.0.32
When deploying sites, enable or disable S3 Lifecycle policies which allow for renders to auto-delete after a certain time. Default is null, which does not change any lifecycle policies of the S3 bucket. See: Lambda autodelete.