Skip to main content

getFunctions()

Retrieves a list of functions that Remotion deployed to AWS Lambda in a certain region.

The parameter compatibleOnly determines whether only functions that are compatible with the installed version of Remotion Lambda should be returned.

note

The Lambda function is versioned and the version of the function must match the version of the @remotion/lambda package. So if you upgrade Remotion, you should deploy a new function or otherwise you might get an empty array from this function.

To get information about only a single function, use getFunctionInfo().

If you are sure that a function exists, you can also guess the name of it using speculateFunctionName() and save an API call to Lambda.

Example​

import {getFunctions} from '@remotion/lambda/client';

const info = await getFunctions({
  region: 'eu-central-1',
  compatibleOnly: true,
});

for (const fn of info) {
  console.log(fn.functionName); // "remotion-render-d8a03x"
  console.log(fn.memorySizeInMb); // 1536
  console.log(fn.timeoutInSeconds); // 120
  console.log(fn.diskSizeInMb); // 10240 (Remotion >=5.0 default)
  console.log(fn.version); // "2021-07-25"
}
note

Preferrably import this function from @remotion/lambda/client to avoid problems inside serverless functions.

Argument​

An object containing the following properties:

region​

The AWS region that you would like to query.

logLevel?v4.0.115​

One of trace, verbose, info, warn, error.
Determines how much info is being logged to the console.

Default info.

compatibleOnly​

If true, only functions that match the version of the current Remotion Lambda package are returned. If false, all functions are returned.

Return value​

A promise resolving to an array of objects with the following properties:

functionName​

The name of the function.

memorySizeInMb​

The amount of memory allocated to the function.

diskSizeInMb​

The amount of ephemereal disk storage allocated to the function. See Disk size for defaults when deploying:

Remotion VersionDefault
<5.0.02048MB
>=5.0.010240MB

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.

Compatibility​

ServersEnvironments
Node.js
Bun
Serverless Functions
Node.js runtime

For serverless functions, use the light client.

See also​