Skip to content

Commit

Permalink
enable v5 runtime flag
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed Jan 5, 2025
1 parent 8bc2c00 commit fdca46e
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 61 deletions.
20 changes: 8 additions & 12 deletions packages/docs/docs/lambda/deployfunction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ image: /generated/articles-docs-lambda-deployfunction.png
id: deployfunction
title: deployFunction()
slug: /lambda/deployfunction
crumb: "Lambda API"
crumb: 'Lambda API'
---

Creates an [AWS Lambda](https://aws.amazon.com/lambda/) function in your AWS account that will be able to render a video in the cloud.
Expand All @@ -16,10 +16,10 @@ If a function with the same version, memory size and timeout already existed, it
// @module: esnext
// @target: es2017

import { deployFunction } from "@remotion/lambda";
import {deployFunction} from '@remotion/lambda';

const { functionName } = await deployFunction({
region: "us-east-1",
const {functionName} = await deployFunction({
region: 'us-east-1',
timeoutInSeconds: 120,
memorySizeInMb: 2048,
createCloudWatchLogGroup: true,
Expand Down Expand Up @@ -57,10 +57,10 @@ Retention period for the CloudWatch Logs. Default: 14 days.

Sets the amount of disk storage that is available in the Lambda function. Must be between 512MB and 10240MB (10GB). Set this higher if you want to render longer videos. See also: [Disk size](/docs/lambda/disk-size)

| Remotion Version | Default |
|------------------|---------------|
| <5.0.0 | 2048MB |
| >=5.0.0 | 10240MB |
| Remotion Version | Default |
| ---------------- | ------- |
| <5.0.0 | 2048MB |
| >=5.0.0 | 10240MB |

### `customRoleArn?`

Expand All @@ -70,10 +70,6 @@ Use a custom role for the function instead of the default (`arn:aws:iam::[aws-ac

<Options id="enable-lambda-insights" />

### `enableV5Runtime?`<AvailableFrom v="4.0.148" />

Enable the [upcoming v5 runtime](/docs/lambda/runtime#runtime-changes-in-remotion-50) with newer Chrome and Node versions early.

### `runtimePreference?`<AvailableFrom v="4.0.205" />

One of:
Expand Down
21 changes: 13 additions & 8 deletions packages/docs/docs/lambda/insights.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
image: /generated/articles-docs-lambda-insights.png
sidebar_label: Insights
title: Enable Lambda Insights
crumb: "Lambda"
crumb: 'Lambda'
---

# Enable Lambda Insights<AvailableFrom v="4.0.61"/>
Expand All @@ -11,8 +11,13 @@ You may enable [AWS Lambda Insights](https://docs.aws.amazon.com/AmazonCloudWatc

## Prerequisites

<Step>1</Step> Ensure you are on at least Remotion v4.0.61. <br/>
<Step>2</Step> If you started using Remotion before v4.0.61, update both your <a href="/docs/lambda/permissions#user-permissions">AWS user permission</a> and <a href="/docs/lambda/permissions#role-permissions">AWS role permission</a>, since now more permissions are needed.
<Step>1</Step> Ensure you are on at least Remotion v4.0.61. <br />
<Step>2</Step> If you started using Remotion before v4.0.61, update both your <a href="/docs/lambda/permissions#user-permissions">
AWS user permission
</a> and <a href="/docs/lambda/permissions#role-permissions">
AWS role permission
</a>
, since now more permissions are needed.

## Enable Lambda Insights

Expand All @@ -29,13 +34,13 @@ If the function already existed before, you need to delete it beforehand.
```tsx twoslash title="deploy.ts" {8, 11-13}
// @module: ESNext
// @target: ESNext
import assert from "assert";
import assert from 'assert';
// ---cut---
import { deployFunction } from "@remotion/lambda";
import {deployFunction} from '@remotion/lambda';

const { alreadyExisted } = await deployFunction({
const {alreadyExisted} = await deployFunction({
createCloudWatchLogGroup: true,
region: "us-east-1",
region: 'us-east-1',
timeoutInSeconds: 120,
memorySizeInMb: 3009,
enableLambdaInsights: true,
Expand Down Expand Up @@ -67,7 +72,7 @@ If you render via the CLI with the `--log=verbose` flag, a link to the Lambda in

## Unsupported regions

Lambda Insights is not supported by AWS in `ap-southeast-4`, `ap-southeast-5` and `eu-central-2`.
Lambda Insights is not supported by AWS in `ap-southeast-4` and `ap-southeast-5`.
If you deploy a Lambda function in one of these regions and attempt to enable Lambda Insight, an error will be thrown.

## See also
Expand Down
1 change: 0 additions & 1 deletion packages/lambda/src/admin/make-layer-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const layerInfo: HostedLayers = {
'us-west-1': [],
'ap-southeast-4': [],
'ap-southeast-5': [],
'eu-central-2': [],
};

const getBucketName = (region: AwsRegion) => {
Expand Down
35 changes: 1 addition & 34 deletions packages/lambda/src/pricing/price-per-1-s.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,40 +791,7 @@ export const pricing: {
price: '0.0000133334',
},
},
'eu-central-2': {
'Lambda Storage-Duration': {
rateCode: '4JZ5N4HUYM6K333N.JRTCKXETXF.6YS6EN2CT7',
price: '0.0000000441',
},
'Lambda Requests-ARM': {
rateCode: 'VUQUVJRYRZKGXHKX.JRTCKXETXF.6YS6EN2CT7',
price: '0.0000002200',
},
'Lambda Provisioned-Concurrency': {
rateCode: 'YYM4DVFSJ5APJDUG.JRTCKXETXF.6YS6EN2CT7',
price: '0.0000055162',
},
'Lambda Duration-ARM': {
rateCode: 'EZZMW8SEEDT6E2G5.JRTCKXETXF.6NBUNBXSC3',
price: '0.0000146667',
},
'Lambda Requests': {
rateCode: '8FY96CH95ZA8NU5C.JRTCKXETXF.6YS6EN2CT7',
price: '0.0000002200',
},
'Lambda Storage-Duration-ARM': {
rateCode: 'TMSMVCZ6FWXCBNM5.JRTCKXETXF.6YS6EN2CT7',
price: '0.0000000441',
},
'Lambda Duration': {
rateCode: 'U6YRFNVKQZTX8VF2.JRTCKXETXF.CUKFZ388N3',
price: '0.0000183334',
},
'Lambda Duration-Provisioned': {
rateCode: '594VMK9T4PANJ2TK.JRTCKXETXF.6YS6EN2CT7',
price: '0.0000128712',
},
},

'us-west-2': {
'Lambda Duration-Provisioned': {
rateCode: 'MP7NQ6MSH3HNCZP6.JRTCKXETXF.6YS6EN2CT7',
Expand Down
1 change: 0 additions & 1 deletion packages/lambda/src/regions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const DEFAULT_AWS_REGIONS = [

export const AWS_REGIONS = [
'eu-central-1',
'eu-central-2',
'eu-west-1',
'eu-west-2',
'eu-west-3',
Expand Down
1 change: 0 additions & 1 deletion packages/lambda/src/shared/lambda-insights-extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ export const lambdaInsightsExtensions: {[region in AwsRegion]: string | null} =
'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:3',
'ap-southeast-4': null,
'ap-southeast-5': null,
'eu-central-2': null,
};
1 change: 0 additions & 1 deletion packages/template-next-app-tailwind/deploy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const { functionName, alreadyExisted: functionAlreadyExisted } =
region: REGION,
timeoutInSeconds: TIMEOUT,
diskSizeInMb: DISK,
enableV5Runtime: true,
});
console.log(
functionName,
Expand Down
1 change: 0 additions & 1 deletion packages/template-next-app/deploy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const { functionName, alreadyExisted: functionAlreadyExisted } =
region: REGION,
timeoutInSeconds: TIMEOUT,
diskSizeInMb: DISK,
enableV5Runtime: true,
});
console.log(
functionName,
Expand Down
1 change: 0 additions & 1 deletion packages/template-next-pages/deploy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const { functionName, alreadyExisted: functionAlreadyExisted } =
region: REGION,
timeoutInSeconds: TIMEOUT,
diskSizeInMb: DISK,
enableV5Runtime: true,
});
console.log(
functionName,
Expand Down
1 change: 0 additions & 1 deletion packages/template-remix/app/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const run = async () => {
region,
diskSizeInMb: DISK,
timeoutInSeconds: TIMEOUT,
enableV5Runtime: true,
});
console.log(
`${alreadyExisted ? "Ensured" : "Deployed"} function "${functionName}"`,
Expand Down

0 comments on commit fdca46e

Please sign in to comment.