Skip to main content

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.

将 Remotion 视频打包并上传到 S3 存储桶。

🌐 Bundle and upload a Remotion video to an S3 bucket.

结果将是一个像 https://remotionlambda-12345.s3.eu-central-1.amazonaws.com/sites/abcdef/index.html 这样的 URL。

🌐 The result will be a URL such as https://remotionlambda-12345.s3.eu-central-1.amazonaws.com/sites/abcdef/index.html.

note

如果你在本地进行了更改,你需要重新部署网站。使用 --site-name 来覆盖现有网站。

你可以使用此“Serve URL”在 Remotion Lambda 上渲染视频,方法如下:

🌐 You can use this "Serve URL" to render a video on Remotion Lambda using:

如果你在 Lambda 上进行渲染,你也可以将站点名称(在这种情况下为 abcdef)作为缩写传递。

🌐 If you are rendering on Lambda, you can also pass the site Name (in this case abcdef) as an abbreviation.

示例输出

(1/3) [====================] 打包视频 3975毫秒


(2/3) [====================] 创建存储桶 457毫秒


(3/3) [====================] 上传到S3 25118毫秒



已部署到S3!


访问URL: https://remotionlambda-12345.s3.eu-central-1.amazonaws.com/sites/abcdef/index.html


网站名称: abcdef


--region

要选择的 AWS 区域。项目和函数都应在此区域内。

🌐 The AWS region to select. Both project and function should be in this region.

--site-name

将项目上传到特定目录并返回一个确定性的 URL。如果该名称下的站点已存在,将被覆盖。只能包含以下字符:0-9a-zA-Z-!_.*'()

🌐 Uploads the project to a specific directory and returns a deterministic URL. If a site already existed under this name, it will be overwritten. 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

指定要使用的特定存储桶名称。这不推荐,最好让 Remotion 自动发现正确的存储桶。

🌐 Specify a specific bucket name to be used. This is not recommended, instead let Remotion discover the right bucket automatically.

--privacyv3.3.97

如果不使用ACL,可以选择 public(默认)或 no-acl。站点必须具有公共URL,才能在Lambda上呈现,因为无头浏览器会打开该URL。

🌐 Either public (default) or no-acl if you are not using ACL. Sites must have a public URL to be able to be rendered on Lambda, since the headless browser opens that URL.

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

--throw-if-site-existsv4.0.141

Prevents accidential update of an existing site. If there are any files in the subfolder where the site should be placed, the function will throw.

--disable-git-sourcev4.0.182

Disables the Git Source being connected to the Remotion Studio. Clicking on stack traces and certain menu items will be disabled.

--force-path-stylev4.0.202

forcePathStyle 传递给 AWS S3 客户端。如果你不知道这是什么,你很可能用不到它。

🌐 Passes forcePathStyle to the AWS S3 client. If you don't know what this is, you probably don't need it.