🎥 Make videos programmatically with React
Add cloudWatchLogRetentionPeriodInDays as an optional param to deployFunction
Viren Mohindra65f5d6e73821
diff --git a/packages/docs/docs/lambda/deployfunction.md b/packages/docs/docs/lambda/deployfunction.mdindex 57842cdd44..20fa18312f 100644--- a/packages/docs/docs/lambda/deployfunction.md+++ b/packages/docs/docs/lambda/deployfunction.md@@ -46,6 +46,10 @@ How many megabytes of RAM the Lambda function should have. By default we recommeWhether logs should be saved into CloudWatch. We recommend enabling this option.+### `cloudWatchLogRetentionPeriodInDays`++Optional. Retention period for the CloudWatch Logs. Default: 14 days.+## Return valueAn object with the following values:diff --git a/packages/lambda/src/api/deploy-function.ts b/packages/lambda/src/api/deploy-function.tsindex f9c5f55ecd..53453fdbc8 100644--- a/packages/lambda/src/api/deploy-function.ts+++ b/packages/lambda/src/api/deploy-function.ts@@ -10,6 +10,7 @@ import {createFunction} from './create-function';export type DeployFunctionInput = {createCloudWatchLogGroup: boolean;+ cloudWatchLogRetentionPeriodInDays?: number;region: AwsRegion;timeoutInSeconds: number;memorySizeInMb: number;@@ -24,6 +25,7 @@ export type DeployFunctionOutput = {* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.* @link https://v3.remotion.dev/docs/lambda/deployfunction* @param options.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.+ * @param options.cloudWatchLogRetentionPeriodInDays Optional. The number of days to retain the CloudWatch logs for this function. Default is 14 days.* @param options.region The region you want to deploy your function to.* @param options.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.* @param options.memorySizeInMb How much memory should be allocated to the Lambda function.@@ -59,6 +61,7 @@ export const deployFunction = async (accountId,memorySizeInMb: options.memorySizeInMb,timeoutInSeconds: options.timeoutInSeconds,+ retentionInDays: options.cloudWatchLogRetentionPeriodInDays as number,alreadyCreated: Boolean(alreadyDeployed),});