Skip to main content

npx remotion lambda 函数部署

npx remotion lambda functions deploy

在你的 AWS 账户中创建一个新函数。如果在同一地区已经存在具有相同 Remotion 版本、相同内存、磁盘空间和超时设置的函数,将返回已部署函数的名称。

🌐 Creates a new function in your AWS account. If a function in the same region, with the same Remotion version, with the same amount of memory, disk space and timeout already exists, the name of the already deployed function will be returned instead.

默认情况下,会创建一个 CloudWatch 日志组,该日志组将调试信息记录到 CloudWatch,以便在出现问题时可以查阅。这些日志的默认保留期为 14 天,可以进行更改。

🌐 By default, a CloudWatch Log Group will be created that will log debug information to CloudWatch that you can consult in the case something is going wrong. The default retention period for these logs is 14 days, which can be changed.

示例输出

区域 = eu-central-1, 内存 = 2048MB, 磁盘 = 2048MB, 超时 = 120秒, 版本 = 2021-12-17, CloudWatch 已启用 = true, CloudWatch 保留周期 = 14 天 VPC 子网 ID = subnet-0f6a0f6a0f6a0f6a0, subnet-0f6a0f6a0f6a0f6a1 VPC 安全组 ID = sg-0f6a0f6a0f6a0f6a0, sg-0f6a0f6a0f6a0f6a1


部署为 remotion-render-2021-12-17-2048mb-120sec


--region

要选择的 AWS 区域

🌐 The AWS region to select.

--memory

内存大小,以兆字节为单位。默认值: 2048 MB。

--disk

磁盘大小,以兆字节为单位。另见:磁盘大小

🌐 Disk size in megabytes. See also: Disk size.

Remotion 版本默认
<5.0.02048MB
>=5.0.010240MB

--timeout

Lambda 函数的超时时间(以秒为单位)。默认值: 120 秒。

--disable-cloudwatch

不会创建 CloudWatch 日志组。

🌐 Does not create a CloudWatch log group.

--retention-period

CloudWatch 日志的保留期限(以天为单位)。默认值: 14 天。

--enable-lambda-insightsv4.0.61

Enable Lambda Insights in AWS CloudWatch. For this to work, you may have to update your role permission.

--custom-role-arn

使用自定义角色来执行该功能,而不是默认角色(arn:aws:iam::[aws-account-id]:role/remotion-lambda-role

🌐 Use a custom role for the function instead of the default (arn:aws:iam::[aws-account-id]:role/remotion-lambda-role)

--quiet, -q

只记录函数名称。

🌐 Only logs the function name.

--vpc-subnet-idsv4.0.160

用于 Lambda 函数 VPC 配置的 VPC 子网 ID 的逗号分隔列表。

🌐 Comma separated list of VPC subnet IDs to use for the Lambda function VPC configuration.

--vpc-security-group-idsv4.0.160

用于 Lambda 函数 VPC 配置的 VPC 安全组 ID 的逗号分隔列表。

🌐 Comma separated list of VPC security group IDs to use for the Lambda function VPC configuration.

--runtime-preferencev4.0.205

其中之一:

🌐 One of:

  • default:当前解析为 cjk
  • apple-emojis:使用苹果表情符号而不是谷歌表情符号。CJK 字符将被移除。
  • cjk:包含中日韓(CJK)字符和谷歌表情符号。苹果表情符号将被移除。
note

苹果表情符号是苹果公司的知识产权。
你对在项目中使用苹果表情符号负责。