@remotion/lambda 4.0.266 → 4.0.269
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/build.ts +1 -0
- package/bundle.ts +23 -0
- package/dist/api/create-function.js +3 -3
- package/dist/api/delete-site.js +3 -3
- package/dist/api/deploy-function.js +2 -2
- package/dist/api/deploy-site.js +3 -3
- package/dist/api/download-media.js +2 -2
- package/dist/api/get-function-info.js +2 -2
- package/dist/api/iam-validation/role-permissions.js +6 -6
- package/dist/api/iam-validation/user-permissions.js +4 -4
- package/dist/cli/commands/compositions/index.js +2 -2
- package/dist/cli/commands/functions/deploy.js +5 -5
- package/dist/cli/commands/functions/index.js +6 -6
- package/dist/cli/commands/functions/rm.js +2 -2
- package/dist/cli/commands/policies/policies.js +5 -5
- package/dist/cli/commands/quotas/increase.js +8 -8
- package/dist/cli/commands/quotas/index.js +3 -3
- package/dist/cli/commands/quotas/list.js +5 -5
- package/dist/cli/commands/render/progress.d.ts +1 -1
- package/dist/cli/commands/render/render.js +4 -4
- package/dist/cli/commands/sites/create.js +2 -2
- package/dist/cli/commands/sites/index.js +6 -6
- package/dist/cli/commands/still.js +4 -4
- package/dist/cli/get-aws-region.js +2 -2
- package/dist/cli/help.js +10 -10
- package/dist/cli/helpers/find-function-name.js +3 -3
- package/dist/cli/index.js +2 -2
- package/dist/esm/client.mjs +2 -0
- package/dist/esm/index.mjs +12886 -0
- package/dist/esm/policies.mjs +167 -0
- package/dist/policies.d.ts +1 -0
- package/dist/{defaults.js → policies.js} +1 -1
- package/dist/shared/function-zip-path.js +4 -1
- package/dist/shared/validate-timeout.js +3 -3
- package/package.json +35 -19
- package/remotionlambda-arm64.zip +0 -0
- package/dist/defaults.d.ts +0 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// src/api/iam-validation/role-permissions.ts
|
|
2
|
+
import {
|
|
3
|
+
LAMBDA_INSIGHTS_PREFIX,
|
|
4
|
+
LOG_GROUP_PREFIX,
|
|
5
|
+
REMOTION_BUCKET_PREFIX,
|
|
6
|
+
RENDER_FN_PREFIX
|
|
7
|
+
} from "@remotion/lambda-client/constants";
|
|
8
|
+
var rolePermissions = [
|
|
9
|
+
{
|
|
10
|
+
actions: ["s3:ListAllMyBuckets"],
|
|
11
|
+
resource: ["*"]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
actions: [
|
|
15
|
+
"s3:CreateBucket",
|
|
16
|
+
"s3:ListBucket",
|
|
17
|
+
"s3:PutBucketAcl",
|
|
18
|
+
"s3:GetObject",
|
|
19
|
+
"s3:DeleteObject",
|
|
20
|
+
"s3:PutObjectAcl",
|
|
21
|
+
"s3:PutObject",
|
|
22
|
+
"s3:GetBucketLocation"
|
|
23
|
+
],
|
|
24
|
+
resource: [`arn:aws:s3:::${REMOTION_BUCKET_PREFIX}*`]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
actions: ["lambda:InvokeFunction"],
|
|
28
|
+
resource: [`arn:aws:lambda:*:*:function:${RENDER_FN_PREFIX}*`]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
actions: ["logs:CreateLogGroup"],
|
|
32
|
+
resource: [`arn:aws:logs:*:*:log-group:${LAMBDA_INSIGHTS_PREFIX}`]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
actions: ["logs:CreateLogStream", "logs:PutLogEvents"],
|
|
36
|
+
resource: [
|
|
37
|
+
`arn:aws:logs:*:*:log-group:${LOG_GROUP_PREFIX}${RENDER_FN_PREFIX}*`,
|
|
38
|
+
`arn:aws:logs:*:*:log-group:${LAMBDA_INSIGHTS_PREFIX}:*`
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
// src/api/iam-validation/user-permissions.ts
|
|
44
|
+
import {
|
|
45
|
+
LOG_GROUP_PREFIX as LOG_GROUP_PREFIX2,
|
|
46
|
+
REMOTION_BUCKET_PREFIX as REMOTION_BUCKET_PREFIX2,
|
|
47
|
+
RENDER_FN_PREFIX as RENDER_FN_PREFIX2
|
|
48
|
+
} from "@remotion/lambda-client/constants";
|
|
49
|
+
|
|
50
|
+
// src/shared/hosted-layers.ts
|
|
51
|
+
var REMOTION_HOSTED_LAYER_ARN = `arn:aws:lambda:*:678892195805:layer:remotion-binaries-*`;
|
|
52
|
+
|
|
53
|
+
// src/api/iam-validation/user-permissions.ts
|
|
54
|
+
var requiredPermissions = [
|
|
55
|
+
{
|
|
56
|
+
id: "HandleQuotas",
|
|
57
|
+
actions: [
|
|
58
|
+
"servicequotas:GetServiceQuota",
|
|
59
|
+
"servicequotas:GetAWSDefaultServiceQuota",
|
|
60
|
+
"servicequotas:RequestServiceQuotaIncrease",
|
|
61
|
+
"servicequotas:ListRequestedServiceQuotaChangeHistoryByQuota"
|
|
62
|
+
],
|
|
63
|
+
resource: ["*"]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "PermissionValidation",
|
|
67
|
+
actions: ["iam:SimulatePrincipalPolicy"],
|
|
68
|
+
resource: ["*"]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "LambdaInvokation",
|
|
72
|
+
actions: ["iam:PassRole"],
|
|
73
|
+
resource: ["arn:aws:iam::*:role/remotion-lambda-role"]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "Storage",
|
|
77
|
+
actions: [
|
|
78
|
+
"s3:GetObject",
|
|
79
|
+
"s3:DeleteObject",
|
|
80
|
+
"s3:PutObjectAcl",
|
|
81
|
+
"s3:PutObject",
|
|
82
|
+
"s3:CreateBucket",
|
|
83
|
+
"s3:ListBucket",
|
|
84
|
+
"s3:GetBucketLocation",
|
|
85
|
+
"s3:PutBucketAcl",
|
|
86
|
+
"s3:DeleteBucket",
|
|
87
|
+
"s3:PutBucketOwnershipControls",
|
|
88
|
+
"s3:PutBucketPublicAccessBlock",
|
|
89
|
+
"s3:PutLifecycleConfiguration"
|
|
90
|
+
],
|
|
91
|
+
resource: [`arn:aws:s3:::${REMOTION_BUCKET_PREFIX2}*`]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "BucketListing",
|
|
95
|
+
actions: ["s3:ListAllMyBuckets"],
|
|
96
|
+
resource: ["*"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "FunctionListing",
|
|
100
|
+
actions: ["lambda:ListFunctions", "lambda:GetFunction"],
|
|
101
|
+
resource: ["*"]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "FunctionManagement",
|
|
105
|
+
actions: [
|
|
106
|
+
"lambda:InvokeAsync",
|
|
107
|
+
"lambda:InvokeFunction",
|
|
108
|
+
"lambda:CreateFunction",
|
|
109
|
+
"lambda:DeleteFunction",
|
|
110
|
+
"lambda:PutFunctionEventInvokeConfig",
|
|
111
|
+
"lambda:PutRuntimeManagementConfig",
|
|
112
|
+
"lambda:TagResource"
|
|
113
|
+
],
|
|
114
|
+
resource: [`arn:aws:lambda:*:*:function:${RENDER_FN_PREFIX2}*`]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "LogsRetention",
|
|
118
|
+
actions: ["logs:CreateLogGroup", "logs:PutRetentionPolicy"],
|
|
119
|
+
resource: [
|
|
120
|
+
`arn:aws:logs:*:*:log-group:${LOG_GROUP_PREFIX2}${RENDER_FN_PREFIX2}*`
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "FetchBinaries",
|
|
125
|
+
actions: ["lambda:GetLayerVersion"],
|
|
126
|
+
resource: [
|
|
127
|
+
REMOTION_HOSTED_LAYER_ARN,
|
|
128
|
+
"arn:aws:lambda:*:580247275435:layer:LambdaInsightsExtension*"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
// src/api/iam-validation/suggested-policy.ts
|
|
134
|
+
var suggestedPolicy = {
|
|
135
|
+
Version: "2012-10-17",
|
|
136
|
+
Statement: [
|
|
137
|
+
...requiredPermissions.map((per) => {
|
|
138
|
+
return {
|
|
139
|
+
Sid: per.id,
|
|
140
|
+
Effect: "Allow",
|
|
141
|
+
Action: per.actions,
|
|
142
|
+
Resource: per.resource
|
|
143
|
+
};
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
};
|
|
147
|
+
var suggestedRolePolicy = {
|
|
148
|
+
Version: "2012-10-17",
|
|
149
|
+
Statement: [
|
|
150
|
+
...rolePermissions.map((per, i) => {
|
|
151
|
+
return {
|
|
152
|
+
Sid: String(i),
|
|
153
|
+
Effect: "Allow",
|
|
154
|
+
Action: per.actions,
|
|
155
|
+
Resource: per.resource
|
|
156
|
+
};
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
};
|
|
160
|
+
var getUserPolicy = () => JSON.stringify(suggestedPolicy, null, 2);
|
|
161
|
+
var ROLE_NAME = "remotion-lambda-role";
|
|
162
|
+
var getRolePolicy = () => JSON.stringify(suggestedRolePolicy, null, 2);
|
|
163
|
+
export {
|
|
164
|
+
getUserPolicy,
|
|
165
|
+
getRolePolicy,
|
|
166
|
+
ROLE_NAME
|
|
167
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api/iam-validation/suggested-policy';
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("
|
|
17
|
+
__exportStar(require("./api/iam-validation/suggested-policy"), exports);
|
|
@@ -4,5 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.FUNCTION_ZIP_ARM64 = void 0;
|
|
7
|
+
// Don't concatenate as we don't want Bun bundler to hardcode this
|
|
7
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
|
|
9
|
+
const b = '../';
|
|
10
|
+
const a = 'remotionlambda-arm64.zip';
|
|
11
|
+
exports.FUNCTION_ZIP_ARM64 = node_path_1.default.resolve(require.resolve(`../` + b), '..', '..', a);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateTimeout = void 0;
|
|
4
|
-
const
|
|
4
|
+
const constants_1 = require("@remotion/lambda-client/constants");
|
|
5
5
|
const validateTimeout = (timeoutInSeconds) => {
|
|
6
6
|
if (typeof timeoutInSeconds !== 'number') {
|
|
7
7
|
throw new TypeError(`parameter 'timeoutInSeconds' must be a number, but got a ${typeof timeoutInSeconds}`);
|
|
@@ -12,8 +12,8 @@ const validateTimeout = (timeoutInSeconds) => {
|
|
|
12
12
|
if (!Number.isFinite(timeoutInSeconds)) {
|
|
13
13
|
throw new TypeError(`parameter 'timeoutInSeconds' must be finite, but is ${timeoutInSeconds}`);
|
|
14
14
|
}
|
|
15
|
-
if (timeoutInSeconds <
|
|
16
|
-
throw new TypeError(`parameter 'timeoutInSeconds' must be between ${
|
|
15
|
+
if (timeoutInSeconds < constants_1.MIN_TIMEOUT || timeoutInSeconds > constants_1.MAX_TIMEOUT) {
|
|
16
|
+
throw new TypeError(`parameter 'timeoutInSeconds' must be between ${constants_1.MIN_TIMEOUT} and ${constants_1.MAX_TIMEOUT}, but got ${timeoutInSeconds}`);
|
|
17
17
|
}
|
|
18
18
|
if (timeoutInSeconds % 1 !== 0) {
|
|
19
19
|
throw new TypeError(`parameter 'timeoutInSeconds' must be an integer but got ${timeoutInSeconds}`);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.269",
|
|
7
7
|
"description": "Render Remotion videos on AWS Lambda",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"@aws-sdk/lib-storage": "3.738.0",
|
|
22
22
|
"@smithy/abort-controller": "4.0.1",
|
|
23
23
|
"zod": "3.22.3",
|
|
24
|
-
"@remotion/
|
|
25
|
-
"@remotion/cli": "4.0.
|
|
26
|
-
"@remotion/lambda-client": "4.0.
|
|
27
|
-
"@remotion/
|
|
28
|
-
"@remotion/
|
|
29
|
-
"remotion": "4.0.
|
|
30
|
-
"
|
|
24
|
+
"@remotion/renderer": "4.0.269",
|
|
25
|
+
"@remotion/cli": "4.0.269",
|
|
26
|
+
"@remotion/lambda-client": "4.0.269",
|
|
27
|
+
"@remotion/streaming": "4.0.269",
|
|
28
|
+
"@remotion/bundler": "4.0.269",
|
|
29
|
+
"@remotion/serverless": "4.0.269",
|
|
30
|
+
"remotion": "4.0.269"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/express": "^5.0.0",
|
|
@@ -40,29 +40,44 @@
|
|
|
40
40
|
"next": "15.1.6",
|
|
41
41
|
"pureimage": "0.4.13",
|
|
42
42
|
"zip-lib": "^0.7.2",
|
|
43
|
-
"@remotion/bundler": "4.0.
|
|
44
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
45
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
43
|
+
"@remotion/bundler": "4.0.269",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.269",
|
|
45
|
+
"@remotion/eslint-config-internal": "4.0.269"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@remotion/bundler": "4.0.
|
|
48
|
+
"@remotion/bundler": "4.0.269"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"exports": {
|
|
54
54
|
"./package.json": "./package.json",
|
|
55
|
-
".":
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
".": {
|
|
56
|
+
"types": "./dist/index.d.ts",
|
|
57
|
+
"require": "./dist/index.js",
|
|
58
|
+
"module": "./dist/esm/index.mjs",
|
|
59
|
+
"import": "./dist/esm/index.mjs"
|
|
60
|
+
},
|
|
61
|
+
"./client": {
|
|
62
|
+
"types": "./dist/client.d.ts",
|
|
63
|
+
"require": "./dist/client.js",
|
|
64
|
+
"module": "./dist/esm/client.mjs",
|
|
65
|
+
"import": "./dist/esm/client.mjs"
|
|
66
|
+
},
|
|
67
|
+
"./policies": {
|
|
68
|
+
"types": "./dist/policies.d.ts",
|
|
69
|
+
"require": "./dist/policies.js",
|
|
70
|
+
"module": "./dist/esm/policies.mjs",
|
|
71
|
+
"import": "./dist/esm/policies.mjs"
|
|
72
|
+
}
|
|
58
73
|
},
|
|
59
74
|
"typesVersions": {
|
|
60
75
|
">=1.0": {
|
|
61
|
-
"policies": [
|
|
62
|
-
"dist/api/iam-validation/suggested-policy.d.ts"
|
|
63
|
-
],
|
|
64
76
|
"client": [
|
|
65
77
|
"dist/client.d.ts"
|
|
78
|
+
],
|
|
79
|
+
"policies": [
|
|
80
|
+
"dist/policies.d.ts"
|
|
66
81
|
]
|
|
67
82
|
}
|
|
68
83
|
},
|
|
@@ -72,6 +87,7 @@
|
|
|
72
87
|
"lint": "eslint src",
|
|
73
88
|
"testlambda": "exit 0",
|
|
74
89
|
"test": "bun test src/test/unit",
|
|
75
|
-
"make": "tsc -d && bun
|
|
90
|
+
"make": "tsc -d && bun --env-file=../.env.bundle bundle.ts",
|
|
91
|
+
"makeruntime": "bun build.ts"
|
|
76
92
|
}
|
|
77
93
|
}
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|
package/dist/defaults.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@remotion/lambda-client/constants';
|