@remotion/lambda 3.3.52 → 3.3.54
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/api/create-function.js +23 -1
- package/dist/api/iam-validation/user-permissions.d.ts +1 -1
- package/dist/api/iam-validation/user-permissions.js +1 -0
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/package.json +18 -18
- package/remotionlambda-arm64.zip +0 -0
- package/remotionlambda-x64.zip +0 -0
|
@@ -9,6 +9,7 @@ const aws_clients_1 = require("../shared/aws-clients");
|
|
|
9
9
|
const hosted_layers_1 = require("../shared/hosted-layers");
|
|
10
10
|
const suggested_policy_1 = require("./iam-validation/suggested-policy");
|
|
11
11
|
const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, architecture, ephemerealStorageInMb, customRoleArn, }) => {
|
|
12
|
+
var _a;
|
|
12
13
|
if (createCloudWatchLogGroup) {
|
|
13
14
|
try {
|
|
14
15
|
await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
|
|
@@ -37,7 +38,6 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
|
|
|
37
38
|
FunctionName: functionName,
|
|
38
39
|
Handler: 'index.handler',
|
|
39
40
|
Role: customRoleArn !== null && customRoleArn !== void 0 ? customRoleArn : defaultRoleName,
|
|
40
|
-
Runtime: 'nodejs14.x',
|
|
41
41
|
Description: 'Renders a Remotion video.',
|
|
42
42
|
MemorySize: memorySizeInMb,
|
|
43
43
|
Timeout: timeoutInSeconds,
|
|
@@ -46,11 +46,33 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
|
|
|
46
46
|
EphemeralStorage: {
|
|
47
47
|
Size: ephemerealStorageInMb,
|
|
48
48
|
},
|
|
49
|
+
Runtime: 'nodejs14.x',
|
|
49
50
|
}));
|
|
50
51
|
await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PutFunctionEventInvokeConfigCommand({
|
|
51
52
|
MaximumRetryAttempts: 0,
|
|
52
53
|
FunctionName,
|
|
53
54
|
}));
|
|
55
|
+
let state = 'Pending';
|
|
56
|
+
while (state === 'Pending') {
|
|
57
|
+
const getFn = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.GetFunctionCommand({
|
|
58
|
+
FunctionName,
|
|
59
|
+
}));
|
|
60
|
+
await new Promise((resolve) => {
|
|
61
|
+
setTimeout(() => resolve(), 1000);
|
|
62
|
+
});
|
|
63
|
+
state = (_a = getFn.Configuration) === null || _a === void 0 ? void 0 : _a.State;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PutRuntimeManagementConfigCommand({
|
|
67
|
+
FunctionName,
|
|
68
|
+
UpdateRuntimeOn: 'Manual',
|
|
69
|
+
RuntimeVersionArn: `arn:aws:lambda:${region}::runtime:69000d3430a08938bcab71617dffcb8ea551a2cbc36c59f38c52a1ea087e461b`,
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
console.log(err);
|
|
74
|
+
console.warn('⚠️ Could not lock the runtime version. We recommend to update your policies to prevent your functions from breaking soon: https://remotion.dev/docs/lambda/feb-2023-incident');
|
|
75
|
+
}
|
|
54
76
|
return { FunctionName: FunctionName };
|
|
55
77
|
};
|
|
56
78
|
exports.createFunction = createFunction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { iam, lambda, logs, s3, servicequotas } from 'aws-policies';
|
|
2
2
|
export declare const requiredPermissions: {
|
|
3
|
-
actions: (s3 | iam | lambda | logs | servicequotas)[];
|
|
3
|
+
actions: (s3 | iam | lambda | 'lambda:PutRuntimeManagementConfig' | logs | servicequotas)[];
|
|
4
4
|
resource: string[];
|
|
5
5
|
id: string;
|
|
6
6
|
}[];
|
|
@@ -58,6 +58,7 @@ exports.requiredPermissions = [
|
|
|
58
58
|
aws_policies_1.lambda.CreateFunction,
|
|
59
59
|
aws_policies_1.lambda.DeleteFunction,
|
|
60
60
|
aws_policies_1.lambda.PutFunctionEventInvokeConfig,
|
|
61
|
+
'lambda:PutRuntimeManagementConfig',
|
|
61
62
|
],
|
|
62
63
|
resource: [`arn:aws:lambda:*:*:function:${constants_1.RENDER_FN_PREFIX}*`],
|
|
63
64
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.54",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -23,28 +23,28 @@
|
|
|
23
23
|
"url": "https://github.com/JonnyBurger/remotion"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@aws-sdk/abort-controller": "3.
|
|
27
|
-
"@aws-sdk/client-cloudwatch-logs": "3.
|
|
28
|
-
"@aws-sdk/client-iam": "3.
|
|
29
|
-
"@aws-sdk/client-lambda": "3.
|
|
30
|
-
"@aws-sdk/client-s3": "3.
|
|
31
|
-
"@aws-sdk/client-service-quotas": "3.
|
|
32
|
-
"@aws-sdk/client-sts": "3.
|
|
33
|
-
"@aws-sdk/credential-providers": "3.
|
|
34
|
-
"@aws-sdk/lib-storage": "3.
|
|
35
|
-
"@aws-sdk/s3-request-presigner": "3.
|
|
36
|
-
"@remotion/bundler": "3.3.
|
|
37
|
-
"@remotion/cli": "3.3.
|
|
38
|
-
"@remotion/renderer": "3.3.
|
|
26
|
+
"@aws-sdk/abort-controller": "3.272.0",
|
|
27
|
+
"@aws-sdk/client-cloudwatch-logs": "3.272.0",
|
|
28
|
+
"@aws-sdk/client-iam": "3.272.0",
|
|
29
|
+
"@aws-sdk/client-lambda": "3.272.0",
|
|
30
|
+
"@aws-sdk/client-s3": "3.272.0",
|
|
31
|
+
"@aws-sdk/client-service-quotas": "3.272.0",
|
|
32
|
+
"@aws-sdk/client-sts": "3.272.0",
|
|
33
|
+
"@aws-sdk/credential-providers": "3.272.0",
|
|
34
|
+
"@aws-sdk/lib-storage": "3.272.0",
|
|
35
|
+
"@aws-sdk/s3-request-presigner": "3.272.0",
|
|
36
|
+
"@remotion/bundler": "3.3.54",
|
|
37
|
+
"@remotion/cli": "3.3.54",
|
|
38
|
+
"@remotion/renderer": "3.3.54",
|
|
39
39
|
"aws-policies": "^1.0.1",
|
|
40
40
|
"mime-types": "2.1.34",
|
|
41
|
-
"remotion": "3.3.
|
|
41
|
+
"remotion": "3.3.54"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@jonny/eslint-config": "3.0.266",
|
|
45
45
|
"@remotion/bundler": "3.3.44",
|
|
46
|
-
"@remotion/compositor-linux-arm64-musl": "3.3.
|
|
47
|
-
"@remotion/compositor-linux-x64-musl": "3.3.
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.54",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "3.3.54",
|
|
48
48
|
"@types/mime-types": "2.1.1",
|
|
49
49
|
"@types/minimist": "1.2.2",
|
|
50
50
|
"@types/node": "^14.14.14",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
]
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "3a004e0b0e2a805fb276c35dd5922e3389c9f53c"
|
|
90
90
|
}
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|
package/remotionlambda-x64.zip
CHANGED
|
Binary file
|