AWS China regionsv4.0.510
Remotion Lambda supports these AWS China regions:
- Beijing:
cn-north-1 - Ningxia:
cn-northwest-1
Use credentials from an AWS China account. AWS accounts and resources from the standard aws partition cannot be used in the aws-cn partition.
Custom Layers
Remotion-hosted Lambda Layers are not available in AWS China regions. Build and publish the required Layers in the same AWS China region, then pass their version ARNs to deployFunction():
deploy-lambda.tsimport {deployFunction } from '@remotion/lambda'; awaitdeployFunction ({region : 'cn-north-1',timeoutInSeconds : 120,memorySizeInMb : 2048,createCloudWatchLogGroup : true,customLayerArns : [ 'arn:aws-cn:lambda:cn-north-1:123456789012:layer:custom-chromium:1', 'arn:aws-cn:lambda:cn-north-1:123456789012:layer:custom-fonts:1', ], });
The Layer ARNs must start with arn:aws-cn: and match the selected region. See Custom Layers for build instructions and size limits.
IAM policies
Generate policies for the aws-cn partition:
policies.tsimport {getRolePolicy ,getUserPolicy } from '@remotion/lambda'; constuserPolicy =getUserPolicy ({partition : 'aws-cn'}); constrolePolicy =getRolePolicy ({partition : 'aws-cn'});
The CLI selects the partition from the configured region:
Generate AWS China policiesnpx remotion lambda policies user --region=cn-north-1 npx remotion lambda policies role --region=cn-north-1
Permissions for custom Layer ARNs must be configured separately. See Custom Layers.
Rendering
renderMediaOnLambda() and renderStillOnLambda() require no China-specific options.
S3 and Console URLs use the AWS China domains, such as amazonaws.com.cn and console.amazonaws.cn. Estimated Lambda costs are returned in CNY.