@remotion/lambda 4.0.137 → 4.0.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/quotas/list.js +2 -14
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -1
- package/dist/functions/helpers/io.d.ts +1 -0
- package/dist/functions/helpers/streamify-response.d.ts +1 -0
- package/dist/functions/launch.js +4 -1
- package/dist/functions/start.js +4 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/internals.d.ts +2 -2
- package/dist/pricing/aws-regions.js +6 -6
- package/dist/shared/constants.d.ts +0 -1
- package/dist/shared/constants.js +2 -3
- package/package.json +12 -12
- package/remotionlambda-arm64.zip +0 -0
|
@@ -10,11 +10,11 @@ const get_aws_region_1 = require("../../get-aws-region");
|
|
|
10
10
|
const log_1 = require("../../log");
|
|
11
11
|
const increase_1 = require("./increase");
|
|
12
12
|
const quotasListCommand = async (logLevel) => {
|
|
13
|
-
var _a, _b, _c
|
|
13
|
+
var _a, _b, _c;
|
|
14
14
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
15
15
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Region = ${region}`));
|
|
16
16
|
log_1.Log.info({ indent: false, logLevel });
|
|
17
|
-
const [concurrencyLimit, defaultConcurrencyLimit,
|
|
17
|
+
const [concurrencyLimit, defaultConcurrencyLimit, changes] = await Promise.all([
|
|
18
18
|
(0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.GetServiceQuotaCommand({
|
|
19
19
|
QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
|
|
20
20
|
ServiceCode: 'lambda',
|
|
@@ -23,10 +23,6 @@ const quotasListCommand = async (logLevel) => {
|
|
|
23
23
|
QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
|
|
24
24
|
ServiceCode: 'lambda',
|
|
25
25
|
})),
|
|
26
|
-
(0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.GetAWSDefaultServiceQuotaCommand({
|
|
27
|
-
QuotaCode: defaults_1.LAMBDA_BURST_LIMIT_QUOTA,
|
|
28
|
-
ServiceCode: 'lambda',
|
|
29
|
-
})),
|
|
30
26
|
(0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.ListRequestedServiceQuotaChangeHistoryByQuotaCommand({
|
|
31
27
|
QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
|
|
32
28
|
ServiceCode: 'lambda',
|
|
@@ -35,9 +31,7 @@ const quotasListCommand = async (logLevel) => {
|
|
|
35
31
|
const openCase = (_a = changes.RequestedQuotas) === null || _a === void 0 ? void 0 : _a.find((r) => r.Status === 'CASE_OPENED');
|
|
36
32
|
const concurrencyCurrent = (_b = concurrencyLimit.Quota) === null || _b === void 0 ? void 0 : _b.Value;
|
|
37
33
|
const defaultConcurrency = (_c = defaultConcurrencyLimit.Quota) === null || _c === void 0 ? void 0 : _c.Value;
|
|
38
|
-
const burstDefault = (_d = burstLimit.Quota) === null || _d === void 0 ? void 0 : _d.Value;
|
|
39
34
|
const increaseRecommended = concurrencyCurrent <= defaultConcurrency;
|
|
40
|
-
const effectiveBurstConcurrency = Math.min(burstDefault, defaultConcurrency);
|
|
41
35
|
if (increaseRecommended) {
|
|
42
36
|
log_1.Log.info({ indent: false, logLevel }, `Concurrency limit: ${concurrencyCurrent} - ${increaseRecommended
|
|
43
37
|
? cli_1.CliInternals.chalk.greenBright('Increase recommended!')
|
|
@@ -53,12 +47,6 @@ const quotasListCommand = async (logLevel) => {
|
|
|
53
47
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('The maximum amount of Lambda functions which can concurrently execute.'));
|
|
54
48
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Run \`npx ${defaults_1.BINARY_NAME} ${_1.QUOTAS_COMMAND} ${increase_1.INCREASE_SUBCOMMAND}\` to ask AWS to increase your limit.`));
|
|
55
49
|
log_1.Log.info({ indent: false, logLevel });
|
|
56
|
-
if (effectiveBurstConcurrency === burstDefault) {
|
|
57
|
-
log_1.Log.info({ indent: false, logLevel }, `Burst concurrency: ${burstDefault}`);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
log_1.Log.info({ indent: false, logLevel }, `Burst concurrency: ${burstDefault}, but only ${effectiveBurstConcurrency} effective because of concurrency limit`);
|
|
61
|
-
}
|
|
62
50
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('The maximum amount of concurrency increase in 10 seconds'));
|
|
63
51
|
};
|
|
64
52
|
exports.quotasListCommand = quotasListCommand;
|
package/dist/client.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { DeleteAfter } from './functions/helpers/lifecycle';
|
|
|
18
18
|
import type { AwsRegion } from './pricing/aws-regions';
|
|
19
19
|
import type { RenderProgress } from './shared/constants';
|
|
20
20
|
import type { WebhookPayload } from './shared/invoke-webhook';
|
|
21
|
-
export {
|
|
21
|
+
export { GetAwsClientInput, GetAwsClientOutput, getAwsClient, } from './api/get-aws-client';
|
|
22
22
|
export { CustomCredentials } from './shared/aws-clients';
|
|
23
|
-
export {
|
|
24
|
-
export type { AwsRegion,
|
|
23
|
+
export { DeleteAfter, deleteRender, getCompositionsOnLambda, getFunctions, getRenderProgress, getSites, presignUrl, renderMediaOnLambda, renderStillOnLambda, renderVideoOnLambda, speculateFunctionName, validateWebhookSignature, };
|
|
24
|
+
export type { AwsRegion, DeleteRenderInput, GetRenderProgressInput, PresignUrlInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderProgress, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SpeculateFunctionNameInput, WebhookPayload, };
|
package/dist/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateWebhookSignature = exports.speculateFunctionName = exports.renderVideoOnLambda = exports.renderStillOnLambda = exports.renderMediaOnLambda = exports.presignUrl = exports.getSites = exports.getRenderProgress = exports.getFunctions = exports.getCompositionsOnLambda = exports.deleteRender = exports.getAwsClient = void 0;
|
|
4
4
|
const delete_render_1 = require("./api/delete-render");
|
|
5
5
|
Object.defineProperty(exports, "deleteRender", { enumerable: true, get: function () { return delete_render_1.deleteRender; } });
|
|
6
6
|
const get_compositions_on_lambda_1 = require("./api/get-compositions-on-lambda");
|
package/dist/functions/launch.js
CHANGED
|
@@ -28,11 +28,14 @@ const validate_composition_1 = require("./helpers/validate-composition");
|
|
|
28
28
|
const write_lambda_error_1 = require("./helpers/write-lambda-error");
|
|
29
29
|
const callFunctionWithRetry = async ({ payload, retries, functionName, }) => {
|
|
30
30
|
try {
|
|
31
|
-
await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
|
|
31
|
+
const result = await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
|
|
32
32
|
FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
|
|
33
33
|
Payload: JSON.stringify(payload),
|
|
34
34
|
InvocationType: 'Event',
|
|
35
35
|
}));
|
|
36
|
+
if (result.FunctionError) {
|
|
37
|
+
throw new Error(`Lambda function ${functionName} returned an error: ${result.FunctionError} ${result.LogResult}`);
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
catch (err) {
|
|
38
41
|
if (err.name === 'ResourceConflictException') {
|
package/dist/functions/start.js
CHANGED
|
@@ -89,11 +89,14 @@ const startHandler = async (params, options) => {
|
|
|
89
89
|
preferLossless: params.preferLossless,
|
|
90
90
|
};
|
|
91
91
|
// Don't replace with callLambda(), we want to return before the render is snone
|
|
92
|
-
await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
|
|
92
|
+
const result = await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
|
|
93
93
|
FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
|
|
94
94
|
Payload: JSON.stringify(payload),
|
|
95
95
|
InvocationType: 'Event',
|
|
96
96
|
}));
|
|
97
|
+
if (result.FunctionError) {
|
|
98
|
+
throw new Error(`Lambda function returned error: ${result.FunctionError} ${result.LogResult}`);
|
|
99
|
+
}
|
|
97
100
|
await initialFile;
|
|
98
101
|
return {
|
|
99
102
|
type: 'success',
|
package/dist/index.d.ts
CHANGED
|
@@ -56,5 +56,5 @@ declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region
|
|
|
56
56
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
57
57
|
*/
|
|
58
58
|
declare const getSites: ({ region, forceBucketName, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
59
|
-
export { deleteSite, deployFunction, deploySite, downloadMedia,
|
|
60
|
-
export type { AwsRegion,
|
|
59
|
+
export { LambdaInternals, deleteFunction, deleteRender, deleteSite, deployFunction, deploySite, downloadMedia, estimatePrice, getAwsClient, getCompositionsOnLambda, getFunctionInfo, getFunctions, getOrCreateBucket, getRegions, getRenderProgress, getRolePolicy, getSites, getUserPolicy, presignUrl, renderMediaOnLambda, renderStillOnLambda, renderVideoOnLambda, simulatePermissions, validateWebhookSignature, };
|
|
60
|
+
export type { AwsRegion, CustomCredentials, DeleteFunctionInput, DeleteRenderInput, DeleteSiteInput, DeleteSiteOutput, DeployFunctionInput, DeployFunctionOutput, DeploySiteInput, DeploySiteOutput, DownloadMediaInput, DownloadMediaOutput, EnhancedErrorInfo, EstimatePriceInput, FunctionInfo, GetAwsClientInput, GetAwsClientOutput, GetCompositionsOnLambdaInput, GetCompositionsOnLambdaOutput, GetFunctionInfoInput, GetFunctionsInput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderProgressInput, GetSitesInput, GetSitesOutput, LambdaErrorInfo, LambdaLSInput, LambdaLsReturnType, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderProgress, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, WebhookPayload, };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateWebhookSignature = exports.simulatePermissions = exports.renderVideoOnLambda = exports.renderStillOnLambda = exports.renderMediaOnLambda = exports.presignUrl = exports.getUserPolicy = exports.getSites = exports.getRolePolicy = exports.getRenderProgress = exports.getRegions = exports.getOrCreateBucket = exports.getFunctions = exports.getFunctionInfo = exports.getCompositionsOnLambda = exports.getAwsClient = exports.estimatePrice = exports.downloadMedia = exports.deploySite = exports.deployFunction = exports.deleteSite = exports.deleteRender = exports.deleteFunction = exports.LambdaInternals = void 0;
|
|
4
4
|
const delete_function_1 = require("./api/delete-function");
|
|
5
5
|
Object.defineProperty(exports, "deleteFunction", { enumerable: true, get: function () { return delete_function_1.deleteFunction; } });
|
|
6
6
|
const delete_render_1 = require("./api/delete-render");
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const LambdaInternals: {
|
|
2
|
-
executeCommand: (args: string[], remotionRoot: string, logLevel: "error" | "
|
|
2
|
+
executeCommand: (args: string[], remotionRoot: string, logLevel: "error" | "warn" | "verbose" | "info") => Promise<void>;
|
|
3
3
|
makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("./defaults").LambdaStartPayload>;
|
|
4
4
|
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, }: import(".").GetRenderProgressInput) => import("./defaults").LambdaStatusPayload;
|
|
5
5
|
makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, offthreadVideoCacheSizeInBytes, deleteAfter, }: import(".").RenderStillOnLambdaInput) => Promise<{
|
|
@@ -14,7 +14,7 @@ export declare const LambdaInternals: {
|
|
|
14
14
|
maxRetries: number;
|
|
15
15
|
frame: number;
|
|
16
16
|
privacy: import("./defaults").Privacy;
|
|
17
|
-
logLevel: "error" | "
|
|
17
|
+
logLevel: "error" | "warn" | "verbose" | "info";
|
|
18
18
|
outName: import("./defaults").OutNameInput | null;
|
|
19
19
|
timeoutInMilliseconds: number;
|
|
20
20
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
@@ -7,10 +7,10 @@ exports.DEFAULT_AWS_REGIONS = [
|
|
|
7
7
|
'eu-west-2',
|
|
8
8
|
'eu-west-3',
|
|
9
9
|
'eu-north-1',
|
|
10
|
-
'us-east-1',
|
|
11
|
-
'us-east-2',
|
|
10
|
+
'us-east-1', // N. Virginia
|
|
11
|
+
'us-east-2', // Ohio;
|
|
12
12
|
'us-west-1',
|
|
13
|
-
'us-west-2',
|
|
13
|
+
'us-west-2', // Oregon
|
|
14
14
|
'ap-south-1',
|
|
15
15
|
'ap-southeast-1',
|
|
16
16
|
'ap-southeast-2',
|
|
@@ -27,10 +27,10 @@ exports.AWS_REGIONS = [
|
|
|
27
27
|
'eu-west-3',
|
|
28
28
|
'eu-south-1',
|
|
29
29
|
'eu-north-1',
|
|
30
|
-
'us-east-1',
|
|
31
|
-
'us-east-2',
|
|
30
|
+
'us-east-1', // N. Virginia
|
|
31
|
+
'us-east-2', // Ohio;
|
|
32
32
|
'us-west-1',
|
|
33
|
-
'us-west-2',
|
|
33
|
+
'us-west-2', // Oregon
|
|
34
34
|
'af-south-1',
|
|
35
35
|
'ap-south-1',
|
|
36
36
|
'ap-east-1',
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LambdaRoutines = exports.REMOTION_FILELIST_TOKEN = exports.REMOTION_CONCATED_TOKEN = exports.CONCAT_FOLDER_TOKEN = exports.RENDERER_PATH_TOKEN = exports.resolvedPropsKey = exports.inputPropsKey = exports.defaultPropsKey = exports.postRenderDataKey = exports.customOutName = exports.outStillName = exports.outName = exports.getSitesKey = exports.getErrorFileName = exports.getErrorKeyPrefix = exports.chunkKeyForIndex = exports.chunkKey = exports.lambdaTimingsKey = exports.lambdaLogsPrefix = exports.lambdaTimingsPrefixForChunk = exports.lambdaTimingsPrefix = exports.lambdaChunkInitializedKey = exports.lambdaChunkInitializedPrefix = exports.initalizedMetadataKey = exports.renderMetadataKey = exports.encodingProgressKey = exports.rendersPrefix = exports.LAMBDA_INSIGHTS_PREFIX = exports.LOG_GROUP_PREFIX = exports.RENDER_FN_PREFIX = exports.REMOTION_BUCKET_PREFIX = exports.ENCODING_PROGRESS_STEP_SIZE = exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = exports.DEFAULT_OUTPUT_PRIVACY = exports.MAX_EPHEMERAL_STORAGE_IN_MB = exports.MIN_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_EPHEMERAL_STORAGE_IN_MB = exports.MAX_FUNCTIONS_PER_RENDER = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_REGION = exports.COMMAND_NOT_FOUND = exports.BINARY_NAME = exports.DEFAULT_FRAMES_PER_LAMBDA = exports.MINIMUM_FRAMES_PER_LAMBDA = exports.MAX_TIMEOUT = exports.MIN_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.DEFAULT_MEMORY_SIZE = exports.MAX_MEMORY = exports.MIN_MEMORY = void 0;
|
|
4
|
-
exports.
|
|
4
|
+
exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = void 0;
|
|
5
5
|
exports.MIN_MEMORY = 512;
|
|
6
6
|
exports.MAX_MEMORY = 10240;
|
|
7
7
|
exports.DEFAULT_MEMORY_SIZE = 2048;
|
|
@@ -105,6 +105,5 @@ var LambdaRoutines;
|
|
|
105
105
|
LambdaRoutines["still"] = "still";
|
|
106
106
|
LambdaRoutines["compositions"] = "compositions";
|
|
107
107
|
LambdaRoutines["merge"] = "merge";
|
|
108
|
-
})(LambdaRoutines
|
|
108
|
+
})(LambdaRoutines || (exports.LambdaRoutines = LambdaRoutines = {}));
|
|
109
109
|
exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = 'L-B99A9384';
|
|
110
|
-
exports.LAMBDA_BURST_LIMIT_QUOTA = 'L-548AE339';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.139",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,29 +26,29 @@
|
|
|
26
26
|
"aws-policies": "^1.0.1",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
28
|
"zod": "3.22.3",
|
|
29
|
-
"@remotion/
|
|
30
|
-
"remotion": "4.0.
|
|
31
|
-
"
|
|
32
|
-
"@remotion/
|
|
29
|
+
"@remotion/bundler": "4.0.139",
|
|
30
|
+
"@remotion/cli": "4.0.139",
|
|
31
|
+
"remotion": "4.0.139",
|
|
32
|
+
"@remotion/renderer": "4.0.139"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@jonny/eslint-config": "3.0.
|
|
35
|
+
"@jonny/eslint-config": "3.0.281",
|
|
36
36
|
"@types/mime-types": "2.1.1",
|
|
37
37
|
"@types/minimist": "1.2.2",
|
|
38
38
|
"@types/node": "18.14.6",
|
|
39
39
|
"@types/prompt": "^1.1.0",
|
|
40
|
-
"eslint": "8.
|
|
41
|
-
"prettier": "3.
|
|
40
|
+
"eslint": "8.56.0",
|
|
41
|
+
"prettier": "3.2.5",
|
|
42
42
|
"pureimage": "0.4.13",
|
|
43
43
|
"prettier-plugin-organize-imports": "3.2.4",
|
|
44
|
-
"ts-node": "
|
|
44
|
+
"ts-node": "10.9.2",
|
|
45
45
|
"vitest": "0.31.1",
|
|
46
46
|
"zip-lib": "^0.7.2",
|
|
47
|
-
"@remotion/bundler": "4.0.
|
|
48
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
47
|
+
"@remotion/bundler": "4.0.139",
|
|
48
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.139"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@remotion/bundler": "4.0.
|
|
51
|
+
"@remotion/bundler": "4.0.139"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|