packages/docs/docs/lambda/getfunctions.mdx
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.
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); // 2048
console.log(fn.version); // "2021-07-25"
}
:::note
Preferrably import this function from @remotion/lambda/client to avoid problems inside serverless functions.
:::
An object containing the following properties:
regionThe AWS region that you would like to query.
logLevel?<AvailableFrom v="4.0.115"/>compatibleOnlyIf true, only functions that match the version of the current Remotion Lambda package are returned. If false, all functions are returned.
A promise resolving to an array of objects with the following properties:
functionNameThe name of the function.
memorySizeInMbThe amount of memory allocated to the function.
diskSizeInMbThe amount of ephemereal disk storage allocated to the function.
versionThe 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.
timeoutInSecondsThe timeout that has been assigned to the Lambda function.