Skip to main content

getFunctionInfo()

Gets information about a function given its name and region.

To get a list of deployed functions, use getFunctions().

To deploy a function, use deployFunction().

Example

ts
import { getFunctionInfo } from "@remotion/lambda";
 
const info = await getFunctionInfo({
functionName: "remotion-render-d7nd2a9f",
region: "eu-central-1",
});
console.log(info.functionName); // remotion-render-d7nd2a9f
console.log(info.memorySizeInMb); // 1500
console.log(info.diskSizeInMb); // 2048
console.log(info.version); // '2021-07-14'
console.log(info.timeoutInSeconds); // 120
ts
import { getFunctionInfo } from "@remotion/lambda";
 
const info = await getFunctionInfo({
functionName: "remotion-render-d7nd2a9f",
region: "eu-central-1",
});
console.log(info.functionName); // remotion-render-d7nd2a9f
console.log(info.memorySizeInMb); // 1500
console.log(info.diskSizeInMb); // 2048
console.log(info.version); // '2021-07-14'
console.log(info.timeoutInSeconds); // 120

Arguments

An object containing the following properties:

region

The AWS region the function resides in.

functionName

The name of the function.

logLevel?v4.0.115

One of verbose, info, warn, error.
Determines how much is being logged to the console.
verbose will also log console.log's from the browser.
Default info.

Return value

If the function does not exist, an error is thrown by the AWS SDK. If the function exists, promise resolving to an object with the following properties is returned:

memorySizeInMb

The amount of memory allocated to the function.

diskSizeInMb

The amount of disk space allocated to the function.

functionName

The name of the function.

version

The version of the function. Remotion is versioning the Lambda function and a render can only be triggered from a version of @remotion/lambda that is matching the one of the function.

timeoutInSeconds

The timeout that has been assigned to the Lambda function.

See also