packages/docs/docs/lambda/aws-china-regions.mdx
Remotion Lambda supports these AWS China regions:
cn-north-1cn-northwest-1Use credentials from an AWS China account. AWS accounts and resources from the standard aws partition cannot be used in the aws-cn partition.
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():
import {deployFunction} from '@remotion/lambda';
await deployFunction({
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.
Generate policies for the aws-cn partition:
import {getRolePolicy, getUserPolicy} from '@remotion/lambda';
const userPolicy = getUserPolicy({partition: 'aws-cn'});
const rolePolicy = getRolePolicy({partition: 'aws-cn'});
The CLI selects the partition from the configured region:
npx 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.
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.