From fdca46e317de93a9aa94b57751e6b9a223006dc4 Mon Sep 17 00:00:00 2001 From: Jonny Burger Date: Sun, 5 Jan 2025 14:25:06 +0100 Subject: [PATCH] enable v5 runtime flag --- packages/docs/docs/lambda/deployfunction.mdx | 20 +++++------ packages/docs/docs/lambda/insights.mdx | 21 ++++++----- .../lambda/src/admin/make-layer-public.ts | 1 - packages/lambda/src/pricing/price-per-1-s.ts | 35 +------------------ packages/lambda/src/regions.ts | 1 - .../src/shared/lambda-insights-extensions.ts | 1 - .../template-next-app-tailwind/deploy.mjs | 1 - packages/template-next-app/deploy.mjs | 1 - packages/template-next-pages/deploy.mjs | 1 - packages/template-remix/app/deploy.ts | 1 - 10 files changed, 22 insertions(+), 61 deletions(-) diff --git a/packages/docs/docs/lambda/deployfunction.mdx b/packages/docs/docs/lambda/deployfunction.mdx index 67397564906..a70e96d3d3c 100644 --- a/packages/docs/docs/lambda/deployfunction.mdx +++ b/packages/docs/docs/lambda/deployfunction.mdx @@ -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. @@ -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, @@ -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?` @@ -70,10 +70,6 @@ Use a custom role for the function instead of the default (`arn:aws:iam::[aws-ac -### `enableV5Runtime?` - -Enable the [upcoming v5 runtime](/docs/lambda/runtime#runtime-changes-in-remotion-50) with newer Chrome and Node versions early. - ### `runtimePreference?` One of: diff --git a/packages/docs/docs/lambda/insights.mdx b/packages/docs/docs/lambda/insights.mdx index b9b72c03c4c..35be5c5679f 100644 --- a/packages/docs/docs/lambda/insights.mdx +++ b/packages/docs/docs/lambda/insights.mdx @@ -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 @@ -11,8 +11,13 @@ You may enable [AWS Lambda Insights](https://docs.aws.amazon.com/AmazonCloudWatc ## Prerequisites -1 Ensure you are on at least Remotion v4.0.61.
-2 If you started using Remotion before v4.0.61, update both your AWS user permission and AWS role permission, since now more permissions are needed. +1 Ensure you are on at least Remotion v4.0.61.
+2 If you started using Remotion before v4.0.61, update both your + AWS user permission + and + AWS role permission + +, since now more permissions are needed. ## Enable Lambda Insights @@ -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, @@ -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 diff --git a/packages/lambda/src/admin/make-layer-public.ts b/packages/lambda/src/admin/make-layer-public.ts index ffbd6889780..f0e34277c33 100644 --- a/packages/lambda/src/admin/make-layer-public.ts +++ b/packages/lambda/src/admin/make-layer-public.ts @@ -34,7 +34,6 @@ const layerInfo: HostedLayers = { 'us-west-1': [], 'ap-southeast-4': [], 'ap-southeast-5': [], - 'eu-central-2': [], }; const getBucketName = (region: AwsRegion) => { diff --git a/packages/lambda/src/pricing/price-per-1-s.ts b/packages/lambda/src/pricing/price-per-1-s.ts index 48019ae174d..169d0353cef 100644 --- a/packages/lambda/src/pricing/price-per-1-s.ts +++ b/packages/lambda/src/pricing/price-per-1-s.ts @@ -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', diff --git a/packages/lambda/src/regions.ts b/packages/lambda/src/regions.ts index 727c0cb2de7..e7fd26aa7c1 100644 --- a/packages/lambda/src/regions.ts +++ b/packages/lambda/src/regions.ts @@ -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', diff --git a/packages/lambda/src/shared/lambda-insights-extensions.ts b/packages/lambda/src/shared/lambda-insights-extensions.ts index 5206193096a..304dced7b5d 100644 --- a/packages/lambda/src/shared/lambda-insights-extensions.ts +++ b/packages/lambda/src/shared/lambda-insights-extensions.ts @@ -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, }; diff --git a/packages/template-next-app-tailwind/deploy.mjs b/packages/template-next-app-tailwind/deploy.mjs index c8d0825190f..6c4358522f4 100644 --- a/packages/template-next-app-tailwind/deploy.mjs +++ b/packages/template-next-app-tailwind/deploy.mjs @@ -44,7 +44,6 @@ const { functionName, alreadyExisted: functionAlreadyExisted } = region: REGION, timeoutInSeconds: TIMEOUT, diskSizeInMb: DISK, - enableV5Runtime: true, }); console.log( functionName, diff --git a/packages/template-next-app/deploy.mjs b/packages/template-next-app/deploy.mjs index 2eefb40d936..a8cbca25ba5 100644 --- a/packages/template-next-app/deploy.mjs +++ b/packages/template-next-app/deploy.mjs @@ -43,7 +43,6 @@ const { functionName, alreadyExisted: functionAlreadyExisted } = region: REGION, timeoutInSeconds: TIMEOUT, diskSizeInMb: DISK, - enableV5Runtime: true, }); console.log( functionName, diff --git a/packages/template-next-pages/deploy.mjs b/packages/template-next-pages/deploy.mjs index 2eefb40d936..a8cbca25ba5 100644 --- a/packages/template-next-pages/deploy.mjs +++ b/packages/template-next-pages/deploy.mjs @@ -43,7 +43,6 @@ const { functionName, alreadyExisted: functionAlreadyExisted } = region: REGION, timeoutInSeconds: TIMEOUT, diskSizeInMb: DISK, - enableV5Runtime: true, }); console.log( functionName, diff --git a/packages/template-remix/app/deploy.ts b/packages/template-remix/app/deploy.ts index f34f05050cc..482af1f3eb5 100644 --- a/packages/template-remix/app/deploy.ts +++ b/packages/template-remix/app/deploy.ts @@ -21,7 +21,6 @@ const run = async () => { region, diskSizeInMb: DISK, timeoutInSeconds: TIMEOUT, - enableV5Runtime: true, }); console.log( `${alreadyExisted ? "Ensured" : "Deployed"} function "${functionName}"`,