@remotion/lambda 4.0.260 → 4.0.261

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.
Files changed (221) hide show
  1. package/build.ts +1 -1
  2. package/dist/admin/make-layer-public.js +3 -3
  3. package/dist/api/create-function.d.ts +1 -2
  4. package/dist/api/create-function.js +8 -8
  5. package/dist/api/delete-site.d.ts +2 -2
  6. package/dist/api/delete-site.js +3 -4
  7. package/dist/api/deploy-function.d.ts +2 -2
  8. package/dist/api/deploy-function.js +9 -13
  9. package/dist/api/deploy-site.d.ts +2 -2
  10. package/dist/api/deploy-site.js +19 -13
  11. package/dist/api/download-media.d.ts +3 -3
  12. package/dist/api/download-media.js +11 -5
  13. package/dist/api/get-function-info.d.ts +1 -1
  14. package/dist/api/get-function-info.js +6 -8
  15. package/dist/api/get-or-create-bucket.d.ts +3 -3
  16. package/dist/api/get-or-create-bucket.js +4 -4
  17. package/dist/api/get-regions.d.ts +1 -1
  18. package/dist/api/get-regions.js +1 -1
  19. package/dist/api/iam-validation/role-permissions.js +6 -7
  20. package/dist/api/iam-validation/simulate-rule.d.ts +1 -1
  21. package/dist/api/iam-validation/simulate-rule.js +2 -2
  22. package/dist/api/iam-validation/simulate.d.ts +1 -1
  23. package/dist/api/iam-validation/simulate.js +2 -2
  24. package/dist/api/iam-validation/user-permissions.js +4 -5
  25. package/dist/api/upload-dir.d.ts +2 -3
  26. package/dist/api/upload-dir.js +7 -4
  27. package/dist/cli/args.d.ts +2 -4
  28. package/dist/cli/commands/compositions/index.d.ts +1 -1
  29. package/dist/cli/commands/compositions/index.js +5 -6
  30. package/dist/cli/commands/functions/deploy.d.ts +1 -1
  31. package/dist/cli/commands/functions/deploy.js +8 -9
  32. package/dist/cli/commands/functions/index.d.ts +1 -1
  33. package/dist/cli/commands/functions/index.js +6 -6
  34. package/dist/cli/commands/functions/ls.d.ts +1 -1
  35. package/dist/cli/commands/functions/rm.js +4 -4
  36. package/dist/cli/commands/functions/rmall.d.ts +1 -1
  37. package/dist/cli/commands/functions/rmall.js +2 -2
  38. package/dist/cli/commands/policies/policies.js +5 -5
  39. package/dist/cli/commands/quotas/increase.js +5 -5
  40. package/dist/cli/commands/quotas/list.js +4 -4
  41. package/dist/cli/commands/render/progress.js +4 -4
  42. package/dist/cli/commands/render/render.d.ts +1 -1
  43. package/dist/cli/commands/render/render.js +13 -16
  44. package/dist/cli/commands/sites/create.d.ts +1 -1
  45. package/dist/cli/commands/sites/create.js +4 -4
  46. package/dist/cli/commands/sites/index.d.ts +1 -1
  47. package/dist/cli/commands/sites/index.js +6 -6
  48. package/dist/cli/commands/sites/ls.js +2 -2
  49. package/dist/cli/commands/sites/rm.d.ts +1 -1
  50. package/dist/cli/commands/sites/rm.js +4 -4
  51. package/dist/cli/commands/sites/rmall.d.ts +1 -1
  52. package/dist/cli/commands/sites/rmall.js +4 -4
  53. package/dist/cli/commands/still.d.ts +1 -1
  54. package/dist/cli/commands/still.js +10 -12
  55. package/dist/cli/get-aws-region.d.ts +1 -1
  56. package/dist/cli/get-aws-region.js +6 -7
  57. package/dist/cli/help.js +10 -10
  58. package/dist/cli/helpers/find-function-name.d.ts +1 -1
  59. package/dist/cli/helpers/find-function-name.js +5 -5
  60. package/dist/cli/index.d.ts +2 -2
  61. package/dist/cli/index.js +15 -17
  62. package/dist/cli/log.d.ts +5 -5
  63. package/dist/client.d.ts +1 -19
  64. package/dist/client.js +15 -30
  65. package/dist/defaults.d.ts +1 -1
  66. package/dist/defaults.js +1 -1
  67. package/dist/functions/aws-server-implementation.d.ts +2 -1
  68. package/dist/functions/aws-server-implementation.js +11 -2
  69. package/dist/functions/full-client-implementation.d.ts +1 -1
  70. package/dist/functions/full-client-implementation.js +0 -2
  71. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  72. package/dist/functions/helpers/get-folder-files.d.ts +1 -1
  73. package/dist/functions/helpers/make-aws-artifact.d.ts +1 -1
  74. package/dist/functions/helpers/read-with-progress.d.ts +2 -3
  75. package/dist/functions/helpers/read-with-progress.js +6 -2
  76. package/dist/functions/index.d.ts +2 -3
  77. package/dist/functions/index.js +2 -4
  78. package/dist/index.d.ts +13 -32
  79. package/dist/index.js +24 -35
  80. package/dist/internals.d.ts +8 -12
  81. package/dist/internals.js +0 -4
  82. package/dist/shared/get-layers.d.ts +1 -4
  83. package/dist/shared/get-layers.js +3 -3
  84. package/dist/shared/get-s3-operations.d.ts +1 -1
  85. package/dist/shared/hosted-layers.d.ts +1 -1
  86. package/dist/shared/lambda-insights-extensions.d.ts +1 -1
  87. package/dist/shared/validate-timeout.js +3 -3
  88. package/package.json +20 -28
  89. package/remotionlambda-arm64.zip +0 -0
  90. package/dist/api/app-router-webhook.d.ts +0 -10
  91. package/dist/api/app-router-webhook.js +0 -43
  92. package/dist/api/bucket-exists.d.ts +0 -3
  93. package/dist/api/bucket-exists.js +0 -26
  94. package/dist/api/clean-items.d.ts +0 -16
  95. package/dist/api/clean-items.js +0 -25
  96. package/dist/api/create-bucket.d.ts +0 -3
  97. package/dist/api/create-bucket.js +0 -45
  98. package/dist/api/delete-function.d.ts +0 -4
  99. package/dist/api/delete-function.js +0 -15
  100. package/dist/api/delete-render.d.ts +0 -20
  101. package/dist/api/delete-render.js +0 -78
  102. package/dist/api/estimate-price.d.ts +0 -17
  103. package/dist/api/estimate-price.js +0 -45
  104. package/dist/api/express-webhook.d.ts +0 -3
  105. package/dist/api/express-webhook.js +0 -46
  106. package/dist/api/get-aws-client.d.ts +0 -30
  107. package/dist/api/get-aws-client.js +0 -56
  108. package/dist/api/get-buckets.d.ts +0 -9
  109. package/dist/api/get-buckets.js +0 -62
  110. package/dist/api/get-compositions-on-lambda.d.ts +0 -20
  111. package/dist/api/get-compositions-on-lambda.js +0 -60
  112. package/dist/api/get-functions.d.ts +0 -9
  113. package/dist/api/get-functions.js +0 -77
  114. package/dist/api/get-render-progress.d.ts +0 -16
  115. package/dist/api/get-render-progress.js +0 -45
  116. package/dist/api/get-sites.d.ts +0 -29
  117. package/dist/api/get-sites.js +0 -79
  118. package/dist/api/make-lambda-payload.d.ts +0 -57
  119. package/dist/api/make-lambda-payload.js +0 -150
  120. package/dist/api/pages-router-webhook.d.ts +0 -5
  121. package/dist/api/pages-router-webhook.js +0 -48
  122. package/dist/api/presign-url.d.ts +0 -14
  123. package/dist/api/presign-url.js +0 -59
  124. package/dist/api/render-media-on-lambda.d.ts +0 -63
  125. package/dist/api/render-media-on-lambda.js +0 -128
  126. package/dist/api/render-still-on-lambda.d.ts +0 -56
  127. package/dist/api/render-still-on-lambda.js +0 -118
  128. package/dist/api/speculate-function-name.d.ts +0 -6
  129. package/dist/api/speculate-function-name.js +0 -20
  130. package/dist/api/validate-webhook-signature.d.ts +0 -5
  131. package/dist/api/validate-webhook-signature.js +0 -28
  132. package/dist/cli/is-cli.d.ts +0 -2
  133. package/dist/cli/is-cli.js +0 -10
  134. package/dist/functions/aws-implementation.d.ts +0 -23
  135. package/dist/functions/aws-implementation.js +0 -97
  136. package/dist/functions/helpers/apply-lifecyle.d.ts +0 -8
  137. package/dist/functions/helpers/apply-lifecyle.js +0 -18
  138. package/dist/functions/helpers/get-output-url-from-metadata.d.ts +0 -3
  139. package/dist/functions/helpers/get-output-url-from-metadata.js +0 -12
  140. package/dist/functions/helpers/lifecycle.d.ts +0 -8
  141. package/dist/functions/helpers/lifecycle.js +0 -24
  142. package/dist/functions/helpers/parse-function-name.d.ts +0 -8
  143. package/dist/functions/helpers/parse-function-name.js +0 -17
  144. package/dist/functions/http-client.d.ts +0 -2
  145. package/dist/functions/http-client.js +0 -18
  146. package/dist/io/delete-file.d.ts +0 -3
  147. package/dist/io/delete-file.js +0 -12
  148. package/dist/io/head-file.d.ts +0 -3
  149. package/dist/io/head-file.js +0 -17
  150. package/dist/io/list-objects.d.ts +0 -3
  151. package/dist/io/list-objects.js +0 -67
  152. package/dist/io/read-file.d.ts +0 -9
  153. package/dist/io/read-file.js +0 -18
  154. package/dist/io/write-file.d.ts +0 -5
  155. package/dist/io/write-file.js +0 -55
  156. package/dist/pricing/price-per-1-s.d.ts +0 -37
  157. package/dist/pricing/price-per-1-s.js +0 -822
  158. package/dist/regions.d.ts +0 -3
  159. package/dist/regions.js +0 -48
  160. package/dist/shared/aws-clients.d.ts +0 -11
  161. package/dist/shared/aws-clients.js +0 -51
  162. package/dist/shared/call-lambda-async.d.ts +0 -3
  163. package/dist/shared/call-lambda-async.js +0 -20
  164. package/dist/shared/call-lambda-streaming.d.ts +0 -7
  165. package/dist/shared/call-lambda-streaming.js +0 -126
  166. package/dist/shared/call-lambda-sync.d.ts +0 -3
  167. package/dist/shared/call-lambda-sync.js +0 -30
  168. package/dist/shared/check-credentials.d.ts +0 -1
  169. package/dist/shared/check-credentials.js +0 -39
  170. package/dist/shared/constants.d.ts +0 -26
  171. package/dist/shared/constants.js +0 -29
  172. package/dist/shared/content-disposition-header.d.ts +0 -2
  173. package/dist/shared/content-disposition-header.js +0 -50
  174. package/dist/shared/convert-to-serve-url.d.ts +0 -6
  175. package/dist/shared/convert-to-serve-url.js +0 -14
  176. package/dist/shared/encode-aws-url-params.d.ts +0 -1
  177. package/dist/shared/encode-aws-url-params.js +0 -7
  178. package/dist/shared/get-account-id.d.ts +0 -3
  179. package/dist/shared/get-account-id.js +0 -15
  180. package/dist/shared/get-aws-urls.d.ts +0 -26
  181. package/dist/shared/get-aws-urls.js +0 -31
  182. package/dist/shared/get-credentials.d.ts +0 -9
  183. package/dist/shared/get-credentials.js +0 -55
  184. package/dist/shared/get-env-variable.d.ts +0 -1
  185. package/dist/shared/get-env-variable.js +0 -15
  186. package/dist/shared/get-function-version.d.ts +0 -7
  187. package/dist/shared/get-function-version.js +0 -32
  188. package/dist/shared/get-s3-client.d.ts +0 -9
  189. package/dist/shared/get-s3-client.js +0 -14
  190. package/dist/shared/get-service-client.d.ts +0 -23
  191. package/dist/shared/get-service-client.js +0 -121
  192. package/dist/shared/is-flaky-error.d.ts +0 -1
  193. package/dist/shared/is-flaky-error.js +0 -77
  194. package/dist/shared/is-in-lambda.d.ts +0 -1
  195. package/dist/shared/is-in-lambda.js +0 -9
  196. package/dist/shared/is-likely-to-have-aws-profile.d.ts +0 -1
  197. package/dist/shared/is-likely-to-have-aws-profile.js +0 -50
  198. package/dist/shared/lambda-version-string.d.ts +0 -1
  199. package/dist/shared/lambda-version-string.js +0 -7
  200. package/dist/shared/lifecycle-rules.d.ts +0 -10
  201. package/dist/shared/lifecycle-rules.js +0 -61
  202. package/dist/shared/make-s3-url.d.ts +0 -6
  203. package/dist/shared/make-s3-url.js +0 -7
  204. package/dist/shared/p-limit.d.ts +0 -1
  205. package/dist/shared/p-limit.js +0 -57
  206. package/dist/shared/random-hash.d.ts +0 -1
  207. package/dist/shared/random-hash.js +0 -13
  208. package/dist/shared/validate-aws-region.d.ts +0 -2
  209. package/dist/shared/validate-aws-region.js +0 -9
  210. package/dist/shared/validate-bucketname.d.ts +0 -4
  211. package/dist/shared/validate-bucketname.js +0 -15
  212. package/dist/shared/validate-disk-size-in-mb.d.ts +0 -1
  213. package/dist/shared/validate-disk-size-in-mb.js +0 -23
  214. package/dist/shared/validate-lambda-codec.d.ts +0 -2
  215. package/dist/shared/validate-lambda-codec.js +0 -21
  216. package/dist/shared/validate-memory-size.d.ts +0 -1
  217. package/dist/shared/validate-memory-size.js +0 -22
  218. package/dist/shared/validate-presign-expiration.d.ts +0 -1
  219. package/dist/shared/validate-presign-expiration.js +0 -29
  220. package/dist/shared/validate-serveurl.d.ts +0 -1
  221. package/dist/shared/validate-serveurl.js +0 -9
package/build.ts CHANGED
@@ -15,7 +15,7 @@ const outfile = path.join(outdir, 'index.js');
15
15
  fs.rmSync(outdir, {recursive: true});
16
16
  fs.mkdirSync(outdir, {recursive: true});
17
17
  const template = require.resolve(
18
- path.join(__dirname, 'src', 'functions', 'index'),
18
+ path.join(__dirname, 'dist', 'functions', 'index'),
19
19
  );
20
20
 
21
21
  await BundlerInternals.esbuild.build({
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const client_lambda_1 = require("@aws-sdk/client-lambda");
4
+ const lambda_client_1 = require("@remotion/lambda-client");
4
5
  const version_1 = require("remotion/version");
5
6
  const get_regions_1 = require("../api/get-regions");
6
7
  const quit_1 = require("../cli/helpers/quit");
7
- const aws_clients_1 = require("../shared/aws-clients");
8
8
  const layerInfo = {
9
9
  'ap-northeast-1': [],
10
10
  'ap-south-1': [],
@@ -46,7 +46,7 @@ const makeLayerPublic = async () => {
46
46
  for (const region of (0, get_regions_1.getRegions)()) {
47
47
  for (const layer of layers) {
48
48
  const layerName = `remotion-binaries-${layer}-arm64`;
49
- const { Version, LayerArn } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PublishLayerVersionCommand({
49
+ const { Version, LayerArn } = await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.PublishLayerVersionCommand({
50
50
  Content: {
51
51
  S3Bucket: getBucketName(region),
52
52
  S3Key: `remotion-layer-${layer}-v12-arm64.zip`,
@@ -64,7 +64,7 @@ const makeLayerPublic = async () => {
64
64
  CompatibleRuntimes: runtimes,
65
65
  Description: version_1.VERSION,
66
66
  }));
67
- await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.AddLayerVersionPermissionCommand({
67
+ await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.AddLayerVersionPermissionCommand({
68
68
  Action: 'lambda:GetLayerVersion',
69
69
  LayerName: layerName,
70
70
  Principal: '*',
@@ -1,6 +1,5 @@
1
+ import { type AwsRegion, type RuntimePreference } from '@remotion/lambda-client';
1
2
  import type { LogLevel } from '@remotion/renderer';
2
- import type { AwsRegion } from '../regions';
3
- import type { RuntimePreference } from '../shared/get-layers';
4
3
  export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, logLevel, vpcSubnetIds, vpcSecurityGroupIds, runtimePreference, }: {
5
4
  createCloudWatchLogGroup: boolean;
6
5
  region: AwsRegion;
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createFunction = void 0;
4
4
  const client_cloudwatch_logs_1 = require("@aws-sdk/client-cloudwatch-logs");
5
5
  const client_lambda_1 = require("@aws-sdk/client-lambda");
6
+ const lambda_client_1 = require("@remotion/lambda-client");
6
7
  const renderer_1 = require("@remotion/renderer");
7
8
  const node_fs_1 = require("node:fs");
8
9
  const version_1 = require("remotion/version");
9
10
  const defaults_1 = require("../defaults");
10
- const aws_clients_1 = require("../shared/aws-clients");
11
11
  const get_layers_1 = require("../shared/get-layers");
12
12
  const lambda_insights_extensions_1 = require("../shared/lambda-insights-extensions");
13
13
  const suggested_policy_1 = require("./iam-validation/suggested-policy");
@@ -16,7 +16,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
16
16
  if (createCloudWatchLogGroup) {
17
17
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Creating CloudWatch group');
18
18
  try {
19
- await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
19
+ await lambda_client_1.LambdaClientInternals.getCloudWatchLogsClient(region).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
20
20
  logGroupName: `${defaults_1.LOG_GROUP_PREFIX}${functionName}`,
21
21
  }));
22
22
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'CloudWatch group successfully created');
@@ -31,7 +31,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
31
31
  }
32
32
  }
33
33
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Adding retention policy to the CloudWatch group');
34
- await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.PutRetentionPolicyCommand({
34
+ await lambda_client_1.LambdaClientInternals.getCloudWatchLogsClient(region).send(new client_cloudwatch_logs_1.PutRetentionPolicyCommand({
35
35
  logGroupName: `${defaults_1.LOG_GROUP_PREFIX}${functionName}`,
36
36
  retentionInDays,
37
37
  }));
@@ -60,7 +60,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
60
60
  if (enableLambdaInsights && !insightsLayer) {
61
61
  throw new Error(`Lambda Insights is not supported by AWS in region ${region}. Please disable Lambda Insights. See http://remotion.dev/docs/lambda/insights#unsupported-regions`);
62
62
  }
63
- const { FunctionName, FunctionArn } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.CreateFunctionCommand({
63
+ const { FunctionName, FunctionArn } = await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.CreateFunctionCommand({
64
64
  Code: {
65
65
  ZipFile: (0, node_fs_1.readFileSync)(zipFile),
66
66
  },
@@ -82,7 +82,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
82
82
  }));
83
83
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Function deployed. Adding tags...');
84
84
  try {
85
- await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.TagResourceCommand({
85
+ await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.TagResourceCommand({
86
86
  Resource: FunctionArn,
87
87
  Tags: {
88
88
  'remotion-lambda': 'true',
@@ -103,7 +103,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
103
103
  }
104
104
  }
105
105
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Disabling function retries (Remotion handles retries itself)...');
106
- await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PutFunctionEventInvokeConfigCommand({
106
+ await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.PutFunctionEventInvokeConfigCommand({
107
107
  MaximumRetryAttempts: 0,
108
108
  FunctionName,
109
109
  }));
@@ -111,7 +111,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
111
111
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Waiting for the function to be ready...');
112
112
  let state = 'Pending';
113
113
  while (state === 'Pending') {
114
- const getFn = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.GetFunctionCommand({
114
+ const getFn = await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.GetFunctionCommand({
115
115
  FunctionName,
116
116
  }));
117
117
  await new Promise((resolve) => {
@@ -123,7 +123,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
123
123
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Locking the runtime version of the function...');
124
124
  const RuntimeVersionArn = `arn:aws:lambda:${region}::runtime:da57c20c4b965d5b75540f6865a35fc8030358e33ec44ecfed33e90901a27a72`;
125
125
  try {
126
- await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PutRuntimeManagementConfigCommand({
126
+ await lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.PutRuntimeManagementConfigCommand({
127
127
  FunctionName,
128
128
  UpdateRuntimeOn: 'Manual',
129
129
  RuntimeVersionArn,
@@ -1,6 +1,6 @@
1
+ import type { AwsRegion } from '@remotion/lambda-client';
2
+ import { type AwsProvider } from '@remotion/lambda-client';
1
3
  import type { ProviderSpecifics } from '@remotion/serverless';
2
- import type { AwsProvider } from '../functions/aws-implementation';
3
- import type { AwsRegion } from '../regions';
4
4
  type MandatoryParameters = {
5
5
  bucketName: string;
6
6
  siteName: string;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteSite = exports.internalDeleteSite = void 0;
4
+ const lambda_client_1 = require("@remotion/lambda-client");
4
5
  const defaults_1 = require("../defaults");
5
- const aws_implementation_1 = require("../functions/aws-implementation");
6
- const clean_items_1 = require("./clean-items");
7
6
  const internalDeleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, providerSpecifics, forcePathStyle, }) => {
8
7
  const accountId = await providerSpecifics.getAccountId({ region });
9
8
  let files = await providerSpecifics.listObjects({
@@ -20,7 +19,7 @@ const internalDeleteSite = async ({ bucketName, siteName, region, onAfterItemDel
20
19
  var _a;
21
20
  return a + ((_a = b.Size) !== null && _a !== void 0 ? _a : 0);
22
21
  }, 0);
23
- await (0, clean_items_1.cleanItems)({
22
+ await lambda_client_1.LambdaClientInternals.cleanItems({
24
23
  list: files.map((f) => f.Key),
25
24
  bucket: bucketName,
26
25
  onAfterItemDeleted: onAfterItemDeleted !== null && onAfterItemDeleted !== void 0 ? onAfterItemDeleted : (() => undefined),
@@ -53,7 +52,7 @@ const deleteSite = (props) => {
53
52
  ...props,
54
53
  onAfterItemDeleted: (_a = props.onAfterItemDeleted) !== null && _a !== void 0 ? _a : null,
55
54
  forcePathStyle: (_b = props.forcePathStyle) !== null && _b !== void 0 ? _b : false,
56
- providerSpecifics: aws_implementation_1.awsImplementation,
55
+ providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
57
56
  });
58
57
  };
59
58
  exports.deleteSite = deleteSite;
@@ -1,7 +1,7 @@
1
+ import type { RuntimePreference } from '@remotion/lambda-client';
2
+ import { type AwsRegion } from '@remotion/lambda-client';
1
3
  import type { LogLevel } from '@remotion/renderer';
2
4
  import type { CloudProvider, FullClientSpecifics, ProviderSpecifics } from '@remotion/serverless';
3
- import type { AwsRegion } from '../regions';
4
- import { type RuntimePreference } from '../shared/get-layers';
5
5
  type MandatoryParameters = {
6
6
  createCloudWatchLogGroup: boolean;
7
7
  cloudWatchLogRetentionPeriodInDays?: number;
@@ -1,30 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deployFunction = exports.internalDeployFunction = void 0;
4
+ const lambda_client_1 = require("@remotion/lambda-client");
4
5
  const error_handling_1 = require("@remotion/renderer/error-handling");
5
6
  const version_1 = require("remotion/version");
6
- const aws_implementation_1 = require("../functions/aws-implementation");
7
+ const defaults_1 = require("../defaults");
7
8
  const full_client_implementation_1 = require("../functions/full-client-implementation");
8
- const constants_1 = require("../shared/constants");
9
9
  const function_zip_path_1 = require("../shared/function-zip-path");
10
10
  const get_layers_1 = require("../shared/get-layers");
11
- const validate_aws_region_1 = require("../shared/validate-aws-region");
12
11
  const validate_custom_role_arn_1 = require("../shared/validate-custom-role-arn");
13
- const validate_disk_size_in_mb_1 = require("../shared/validate-disk-size-in-mb");
14
- const validate_memory_size_1 = require("../shared/validate-memory-size");
15
12
  const validate_retention_period_1 = require("../shared/validate-retention-period");
16
13
  const validate_timeout_1 = require("../shared/validate-timeout");
17
- const speculate_function_name_1 = require("./speculate-function-name");
18
14
  const internalDeployFunction = async (params) => {
19
15
  var _a, _b;
20
- (0, validate_memory_size_1.validateMemorySize)(params.memorySizeInMb);
16
+ lambda_client_1.LambdaClientInternals.validateMemorySize(params.memorySizeInMb);
21
17
  (0, validate_timeout_1.validateTimeout)(params.timeoutInSeconds);
22
- (0, validate_aws_region_1.validateAwsRegion)(params.region);
18
+ lambda_client_1.LambdaClientInternals.validateAwsRegion(params.region);
23
19
  (0, validate_retention_period_1.validateCloudWatchRetentionPeriod)(params.cloudWatchLogRetentionPeriodInDays);
24
- (0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(params.diskSizeInMb);
20
+ lambda_client_1.LambdaClientInternals.validateDiskSizeInMb(params.diskSizeInMb);
25
21
  (0, validate_custom_role_arn_1.validateCustomRoleArn)(params.customRoleArn);
26
22
  (0, get_layers_1.validateRuntimePreference)(params.runtimePreference);
27
- const functionName = (0, speculate_function_name_1.speculateFunctionName)({
23
+ const functionName = (0, lambda_client_1.speculateFunctionName)({
28
24
  diskSizeInMb: params.diskSizeInMb,
29
25
  memorySizeInMb: params.memorySizeInMb,
30
26
  timeoutInSeconds: params.timeoutInSeconds,
@@ -48,7 +44,7 @@ const internalDeployFunction = async (params) => {
48
44
  accountId,
49
45
  memorySizeInMb: params.memorySizeInMb,
50
46
  timeoutInSeconds: params.timeoutInSeconds,
51
- retentionInDays: (_a = params.cloudWatchLogRetentionPeriodInDays) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD,
47
+ retentionInDays: (_a = params.cloudWatchLogRetentionPeriodInDays) !== null && _a !== void 0 ? _a : lambda_client_1.LambdaClientInternals.DEFAULT_CLOUDWATCH_RETENTION_PERIOD,
52
48
  alreadyCreated: Boolean(alreadyDeployed),
53
49
  ephemerealStorageInMb: params.diskSizeInMb,
54
50
  customRoleArn: params.customRoleArn,
@@ -81,7 +77,7 @@ const deployFunction = ({ createCloudWatchLogGroup, memorySizeInMb, region, time
81
77
  logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
82
78
  createCloudWatchLogGroup,
83
79
  customRoleArn: customRoleArn !== null && customRoleArn !== void 0 ? customRoleArn : undefined,
84
- diskSizeInMb: diskSizeInMb !== null && diskSizeInMb !== void 0 ? diskSizeInMb : constants_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB,
80
+ diskSizeInMb: diskSizeInMb !== null && diskSizeInMb !== void 0 ? diskSizeInMb : defaults_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB,
85
81
  enableLambdaInsights: enableLambdaInsights !== null && enableLambdaInsights !== void 0 ? enableLambdaInsights : false,
86
82
  memorySizeInMb,
87
83
  region,
@@ -90,7 +86,7 @@ const deployFunction = ({ createCloudWatchLogGroup, memorySizeInMb, region, time
90
86
  vpcSubnetIds,
91
87
  vpcSecurityGroupIds,
92
88
  runtimePreference: runtimePreference !== null && runtimePreference !== void 0 ? runtimePreference : 'default',
93
- providerSpecifics: aws_implementation_1.awsImplementation,
89
+ providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
94
90
  fullClientSpecifics: full_client_implementation_1.awsFullClientSpecifics,
95
91
  });
96
92
  };
@@ -1,9 +1,9 @@
1
1
  import { type GitSource, type WebpackOverrideFn } from '@remotion/bundler';
2
+ import type { AwsRegion } from '@remotion/lambda-client';
3
+ import { type AwsProvider } from '@remotion/lambda-client';
2
4
  import type { ToOptions } from '@remotion/renderer';
3
5
  import type { BrowserSafeApis } from '@remotion/renderer/client';
4
6
  import type { FullClientSpecifics, ProviderSpecifics, UploadDirProgress } from '@remotion/serverless';
5
- import type { AwsProvider } from '../functions/aws-implementation';
6
- import type { AwsRegion } from '../regions';
7
7
  type MandatoryParameters = {
8
8
  entryPoint: string;
9
9
  bucketName: string;
@@ -4,24 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.deploySite = exports.internalDeploySite = void 0;
7
+ const lambda_client_1 = require("@remotion/lambda-client");
7
8
  const error_handling_1 = require("@remotion/renderer/error-handling");
8
- const client_1 = require("@remotion/serverless/client");
9
+ const serverless_1 = require("@remotion/serverless");
9
10
  const node_fs_1 = __importDefault(require("node:fs"));
10
- const aws_implementation_1 = require("../functions/aws-implementation");
11
+ const defaults_1 = require("../defaults");
11
12
  const full_client_implementation_1 = require("../functions/full-client-implementation");
12
- const constants_1 = require("../shared/constants");
13
13
  const get_s3_operations_1 = require("../shared/get-s3-operations");
14
- const make_s3_url_1 = require("../shared/make-s3-url");
15
- const validate_aws_region_1 = require("../shared/validate-aws-region");
16
14
  const validate_site_name_1 = require("../shared/validate-site-name");
17
15
  const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options, region, privacy, gitSource, throwIfSiteExists, providerSpecifics, forcePathStyle, fullClientSpecifics, }) => {
18
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19
- (0, validate_aws_region_1.validateAwsRegion)(region);
20
- (0, client_1.validateBucketName)(bucketName, {
21
- mustStartWithRemotion: !(options === null || options === void 0 ? void 0 : options.bypassBucketNameValidation),
17
+ lambda_client_1.LambdaClientInternals.validateAwsRegion(region);
18
+ (0, serverless_1.validateBucketName)({
19
+ bucketName,
20
+ bucketNamePrefix: defaults_1.REMOTION_BUCKET_PREFIX,
21
+ options: {
22
+ mustStartWithRemotion: !(options === null || options === void 0 ? void 0 : options.bypassBucketNameValidation),
23
+ },
22
24
  });
23
25
  (0, validate_site_name_1.validateSiteName)(siteName);
24
- (0, client_1.validatePrivacy)(privacy, false);
26
+ (0, serverless_1.validatePrivacy)(privacy, false);
25
27
  const accountId = await providerSpecifics.getAccountId({ region });
26
28
  const bucketExists = await providerSpecifics.bucketExists({
27
29
  bucketName,
@@ -32,7 +34,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
32
34
  if (!bucketExists) {
33
35
  throw new Error(`No bucket with the name ${bucketName} exists`);
34
36
  }
35
- const subFolder = (0, constants_1.getSitesKey)(siteName);
37
+ const subFolder = (0, defaults_1.getSitesKey)(siteName);
36
38
  const [files, bundled] = await Promise.all([
37
39
  providerSpecifics.listObjects({
38
40
  bucketName,
@@ -108,7 +110,11 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
108
110
  });
109
111
  }
110
112
  return {
111
- serveUrl: (0, make_s3_url_1.makeS3ServeUrl)({ bucketName, subFolder, region }),
113
+ serveUrl: lambda_client_1.LambdaClientInternals.makeS3ServeUrl({
114
+ bucketName,
115
+ subFolder,
116
+ region,
117
+ }),
112
118
  siteName,
113
119
  stats: {
114
120
  uploadedFiles: toUpload.length,
@@ -131,11 +137,11 @@ const deploySite = (args) => {
131
137
  gitSource: (_a = args.gitSource) !== null && _a !== void 0 ? _a : null,
132
138
  options: (_b = args.options) !== null && _b !== void 0 ? _b : {},
133
139
  privacy: (_c = args.privacy) !== null && _c !== void 0 ? _c : 'public',
134
- siteName: (_d = args.siteName) !== null && _d !== void 0 ? _d : aws_implementation_1.awsImplementation.randomHash(),
140
+ siteName: (_d = args.siteName) !== null && _d !== void 0 ? _d : lambda_client_1.LambdaClientInternals.awsImplementation.randomHash(),
135
141
  indent: false,
136
142
  logLevel: 'info',
137
143
  throwIfSiteExists: (_e = args.throwIfSiteExists) !== null && _e !== void 0 ? _e : false,
138
- providerSpecifics: aws_implementation_1.awsImplementation,
144
+ providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
139
145
  forcePathStyle: (_f = args.forcePathStyle) !== null && _f !== void 0 ? _f : false,
140
146
  fullClientSpecifics: full_client_implementation_1.awsFullClientSpecifics,
141
147
  });
@@ -1,9 +1,9 @@
1
+ import type { AwsRegion } from '@remotion/lambda-client';
2
+ import { type AwsProvider } from '@remotion/lambda-client';
1
3
  import type { LogLevel } from '@remotion/renderer';
2
4
  import type { ProviderSpecifics } from '@remotion/serverless';
3
- import { type CustomCredentials } from '@remotion/serverless/client';
4
- import type { AwsProvider } from '../functions/aws-implementation';
5
+ import { type CustomCredentials } from '@remotion/serverless';
5
6
  import type { LambdaReadFileProgress } from '../functions/helpers/read-with-progress';
6
- import type { AwsRegion } from '../regions';
7
7
  export type DownloadMediaInput = {
8
8
  region: AwsRegion;
9
9
  bucketName: string;
@@ -4,17 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.downloadMedia = exports.internalDownloadMedia = void 0;
7
+ const lambda_client_1 = require("@remotion/lambda-client");
7
8
  const renderer_1 = require("@remotion/renderer");
8
- const client_1 = require("@remotion/serverless/client");
9
+ const serverless_1 = require("@remotion/serverless");
9
10
  const node_path_1 = __importDefault(require("node:path"));
10
- const aws_implementation_1 = require("../functions/aws-implementation");
11
+ const defaults_1 = require("../defaults");
11
12
  const read_with_progress_1 = require("../functions/helpers/read-with-progress");
12
13
  const internalDownloadMedia = async (input) => {
13
14
  var _a, _b, _c, _d;
14
15
  const expectedBucketOwner = await input.providerSpecifics.getAccountId({
15
16
  region: input.region,
16
17
  });
17
- const overallProgress = await (0, client_1.getOverallProgressFromStorage)({
18
+ const overallProgress = await (0, serverless_1.getOverallProgressFromStorage)({
18
19
  bucketName: input.bucketName,
19
20
  expectedBucketOwner,
20
21
  region: input.region,
@@ -27,7 +28,12 @@ const internalDownloadMedia = async (input) => {
27
28
  }
28
29
  const outputPath = node_path_1.default.resolve(process.cwd(), input.outPath);
29
30
  renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
30
- const { key, renderBucketName, customCredentials } = (0, client_1.getExpectedOutName)(overallProgress.renderMetadata, input.bucketName, (_a = input.customCredentials) !== null && _a !== void 0 ? _a : null);
31
+ const { key, renderBucketName, customCredentials } = (0, serverless_1.getExpectedOutName)({
32
+ renderMetadata: overallProgress.renderMetadata,
33
+ bucketName: input.bucketName,
34
+ customCredentials: (_a = input.customCredentials) !== null && _a !== void 0 ? _a : null,
35
+ bucketNamePrefix: defaults_1.REMOTION_BUCKET_PREFIX,
36
+ });
31
37
  const { sizeInBytes } = await (0, read_with_progress_1.lambdaDownloadFileWithProgress)({
32
38
  bucketName: renderBucketName,
33
39
  expectedBucketOwner,
@@ -52,7 +58,7 @@ exports.internalDownloadMedia = internalDownloadMedia;
52
58
  const downloadMedia = (input) => {
53
59
  return (0, exports.internalDownloadMedia)({
54
60
  ...input,
55
- providerSpecifics: aws_implementation_1.awsImplementation,
61
+ providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
56
62
  forcePathStyle: false,
57
63
  });
58
64
  };
@@ -1,6 +1,6 @@
1
+ import type { AwsRegion } from '@remotion/lambda-client';
1
2
  import type { LogLevel } from '@remotion/renderer';
2
3
  import type { FunctionInfo } from '@remotion/serverless';
3
- import type { AwsRegion } from '../regions';
4
4
  export type GetFunctionInfoInput = {
5
5
  region: AwsRegion;
6
6
  functionName: string;
@@ -2,22 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFunctionInfo = void 0;
4
4
  const client_lambda_1 = require("@aws-sdk/client-lambda");
5
- const aws_clients_1 = require("../shared/aws-clients");
6
- const constants_1 = require("../shared/constants");
7
- const get_function_version_1 = require("../shared/get-function-version");
8
- const validate_aws_region_1 = require("../shared/validate-aws-region");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
6
+ const defaults_1 = require("../defaults");
9
7
  /*
10
8
  * @description Gets information about a function given its name and region.
11
9
  * @see [Documentation](https://remotion.dev/docs/lambda/getfunctioninfo)
12
10
  */
13
11
  const getFunctionInfo = async ({ region, functionName, logLevel, }) => {
14
12
  var _a, _b, _c, _d, _e;
15
- (0, validate_aws_region_1.validateAwsRegion)(region);
13
+ lambda_client_1.LambdaClientInternals.validateAwsRegion(region);
16
14
  const [functionInfo, version] = await Promise.all([
17
- (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.GetFunctionCommand({
15
+ lambda_client_1.LambdaClientInternals.getLambdaClient(region).send(new client_lambda_1.GetFunctionCommand({
18
16
  FunctionName: functionName,
19
17
  })),
20
- (0, get_function_version_1.getFunctionVersion)({
18
+ (0, lambda_client_1.getFunctionVersion)({
21
19
  functionName,
22
20
  region,
23
21
  logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
@@ -28,7 +26,7 @@ const getFunctionInfo = async ({ region, functionName, logLevel, }) => {
28
26
  timeoutInSeconds: (_a = functionInfo.Configuration) === null || _a === void 0 ? void 0 : _a.Timeout,
29
27
  memorySizeInMb: (_b = functionInfo.Configuration) === null || _b === void 0 ? void 0 : _b.MemorySize,
30
28
  version,
31
- diskSizeInMb: (_e = (_d = (_c = functionInfo.Configuration) === null || _c === void 0 ? void 0 : _c.EphemeralStorage) === null || _d === void 0 ? void 0 : _d.Size) !== null && _e !== void 0 ? _e : constants_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB,
29
+ diskSizeInMb: (_e = (_d = (_c = functionInfo.Configuration) === null || _c === void 0 ? void 0 : _c.EphemeralStorage) === null || _d === void 0 ? void 0 : _d.Size) !== null && _e !== void 0 ? _e : defaults_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB,
32
30
  };
33
31
  };
34
32
  exports.getFunctionInfo = getFunctionInfo;
@@ -1,3 +1,3 @@
1
- import type { GetOrCreateBucketInput } from '@remotion/serverless/client';
2
- import type { AwsProvider } from '../functions/aws-implementation';
3
- export declare const getOrCreateBucket: (options: GetOrCreateBucketInput<AwsProvider>) => Promise<import("@remotion/serverless/client").GetOrCreateBucketOutput>;
1
+ import type { AwsProvider } from '@remotion/lambda-client';
2
+ import type { GetOrCreateBucketInput } from '@remotion/serverless';
3
+ export declare const getOrCreateBucket: (options: GetOrCreateBucketInput<AwsProvider>) => Promise<import("@remotion/lambda-client").GetOrCreateBucketOutput>;
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOrCreateBucket = void 0;
4
- const client_1 = require("@remotion/serverless/client");
5
- const aws_implementation_1 = require("../functions/aws-implementation");
4
+ const lambda_client_1 = require("@remotion/lambda-client");
5
+ const serverless_1 = require("@remotion/serverless");
6
6
  /*
7
7
  * @description Creates a Cloud Storage bucket for Remotion Cloud Run in your GCP project. If one already exists, it will get returned instead.
8
8
  * @see [Documentation](https://remotion.dev/docs/cloudrun/getorcreatebucket)
9
9
  */
10
10
  const getOrCreateBucket = (options) => {
11
11
  var _a, _b;
12
- return (0, client_1.internalGetOrCreateBucket)({
12
+ return (0, serverless_1.internalGetOrCreateBucket)({
13
13
  region: options.region,
14
14
  enableFolderExpiry: (_a = options.enableFolderExpiry) !== null && _a !== void 0 ? _a : null,
15
15
  customCredentials: (_b = options.customCredentials) !== null && _b !== void 0 ? _b : null,
16
- providerSpecifics: aws_implementation_1.awsImplementation,
16
+ providerSpecifics: lambda_client_1.LambdaClientInternals.awsImplementation,
17
17
  forcePathStyle: false,
18
18
  skipPutAcl: false,
19
19
  });
@@ -1,4 +1,4 @@
1
- import type { AwsRegion } from '../regions';
1
+ import type { AwsRegion } from '@remotion/lambda-client';
2
2
  type Options = {
3
3
  enabledByDefaultOnly?: boolean;
4
4
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRegions = void 0;
4
- const regions_1 = require("../regions");
4
+ const regions_1 = require("@remotion/lambda-client/regions");
5
5
  /*
6
6
  * @description Gets an array of all supported GCP regions of this release of Remotion Cloud Run.
7
7
  * @see [Documentation](https://remotion.dev/docs/cloudrun/getregions)
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.rolePermissions = void 0;
4
- const client_1 = require("@remotion/serverless/client");
5
- const constants_1 = require("../../shared/constants");
4
+ const defaults_1 = require("../../defaults");
6
5
  exports.rolePermissions = [
7
6
  {
8
7
  actions: ['s3:ListAllMyBuckets'],
@@ -19,21 +18,21 @@ exports.rolePermissions = [
19
18
  's3:PutObject',
20
19
  's3:GetBucketLocation',
21
20
  ],
22
- resource: [`arn:aws:s3:::${client_1.REMOTION_BUCKET_PREFIX}*`],
21
+ resource: [`arn:aws:s3:::${defaults_1.REMOTION_BUCKET_PREFIX}*`],
23
22
  },
24
23
  {
25
24
  actions: ['lambda:InvokeFunction'],
26
- resource: [`arn:aws:lambda:*:*:function:${constants_1.RENDER_FN_PREFIX}*`],
25
+ resource: [`arn:aws:lambda:*:*:function:${defaults_1.RENDER_FN_PREFIX}*`],
27
26
  },
28
27
  {
29
28
  actions: ['logs:CreateLogGroup'],
30
- resource: [`arn:aws:logs:*:*:log-group:${constants_1.LAMBDA_INSIGHTS_PREFIX}`],
29
+ resource: [`arn:aws:logs:*:*:log-group:${defaults_1.LAMBDA_INSIGHTS_PREFIX}`],
31
30
  },
32
31
  {
33
32
  actions: ['logs:CreateLogStream', 'logs:PutLogEvents'],
34
33
  resource: [
35
- `arn:aws:logs:*:*:log-group:${constants_1.LOG_GROUP_PREFIX}${constants_1.RENDER_FN_PREFIX}*`,
36
- `arn:aws:logs:*:*:log-group:${constants_1.LAMBDA_INSIGHTS_PREFIX}:*`,
34
+ `arn:aws:logs:*:*:log-group:${defaults_1.LOG_GROUP_PREFIX}${defaults_1.RENDER_FN_PREFIX}*`,
35
+ `arn:aws:logs:*:*:log-group:${defaults_1.LAMBDA_INSIGHTS_PREFIX}:*`,
37
36
  ],
38
37
  },
39
38
  ];
@@ -1,4 +1,4 @@
1
- import type { AwsRegion } from '../../regions';
1
+ import type { AwsRegion } from '@remotion/lambda-client';
2
2
  export type EvalDecision = 'allowed' | 'explicitDeny' | 'implicitDeny';
3
3
  export type SimulationResult = {
4
4
  decision: EvalDecision;
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.simulateRule = void 0;
4
4
  const client_iam_1 = require("@aws-sdk/client-iam");
5
- const aws_clients_1 = require("../../shared/aws-clients");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
6
6
  const simulateRule = async (options) => {
7
7
  var _a;
8
8
  try {
9
- const res = await (0, aws_clients_1.getIamClient)(options.region).send(new client_iam_1.SimulatePrincipalPolicyCommand({
9
+ const res = await lambda_client_1.LambdaClientInternals.getIamClient(options.region).send(new client_iam_1.SimulatePrincipalPolicyCommand({
10
10
  ActionNames: options.actionNames,
11
11
  PolicySourceArn: options.arn,
12
12
  ResourceArns: options.resource,
@@ -1,4 +1,4 @@
1
- import type { AwsRegion } from '../../regions';
1
+ import type { AwsRegion } from '@remotion/lambda-client';
2
2
  import type { SimulationResult } from './simulate-rule';
3
3
  export declare const logPermissionOutput: (output: SimulationResult) => string;
4
4
  export type SimulatePermissionsInput = {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.simulatePermissions = exports.logPermissionOutput = void 0;
4
4
  const client_sts_1 = require("@aws-sdk/client-sts");
5
- const aws_clients_1 = require("../../shared/aws-clients");
5
+ const lambda_client_1 = require("@remotion/lambda-client");
6
6
  const simulate_rule_1 = require("./simulate-rule");
7
7
  const user_permissions_1 = require("./user-permissions");
8
8
  const getEmojiForStatus = (decision) => {
@@ -23,7 +23,7 @@ exports.logPermissionOutput = logPermissionOutput;
23
23
  */
24
24
  const simulatePermissions = async (options) => {
25
25
  var _a;
26
- const callerIdentity = await (0, aws_clients_1.getStsClient)(options.region).send(new client_sts_1.GetCallerIdentityCommand({}));
26
+ const callerIdentity = await lambda_client_1.LambdaClientInternals.getStsClient(options.region).send(new client_sts_1.GetCallerIdentityCommand({}));
27
27
  if (!(callerIdentity === null || callerIdentity === void 0 ? void 0 : callerIdentity.Arn)) {
28
28
  throw new Error('No valid AWS Caller Identity detected');
29
29
  }
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.requiredPermissions = void 0;
4
- const client_1 = require("@remotion/serverless/client");
5
- const constants_1 = require("../../shared/constants");
4
+ const defaults_1 = require("../../defaults");
6
5
  const hosted_layers_1 = require("../../shared/hosted-layers");
7
6
  exports.requiredPermissions = [
8
7
  {
@@ -41,7 +40,7 @@ exports.requiredPermissions = [
41
40
  's3:PutBucketPublicAccessBlock',
42
41
  's3:PutLifecycleConfiguration',
43
42
  ],
44
- resource: [`arn:aws:s3:::${client_1.REMOTION_BUCKET_PREFIX}*`],
43
+ resource: [`arn:aws:s3:::${defaults_1.REMOTION_BUCKET_PREFIX}*`],
45
44
  },
46
45
  {
47
46
  id: 'BucketListing',
@@ -64,13 +63,13 @@ exports.requiredPermissions = [
64
63
  'lambda:PutRuntimeManagementConfig',
65
64
  'lambda:TagResource',
66
65
  ],
67
- resource: [`arn:aws:lambda:*:*:function:${constants_1.RENDER_FN_PREFIX}*`],
66
+ resource: [`arn:aws:lambda:*:*:function:${defaults_1.RENDER_FN_PREFIX}*`],
68
67
  },
69
68
  {
70
69
  id: 'LogsRetention',
71
70
  actions: ['logs:CreateLogGroup', 'logs:PutRetentionPolicy'],
72
71
  resource: [
73
- `arn:aws:logs:*:*:log-group:${constants_1.LOG_GROUP_PREFIX}${constants_1.RENDER_FN_PREFIX}*`,
72
+ `arn:aws:logs:*:*:log-group:${defaults_1.LOG_GROUP_PREFIX}${defaults_1.RENDER_FN_PREFIX}*`,
74
73
  ],
75
74
  },
76
75
  {
@@ -1,6 +1,5 @@
1
- import type { UploadDirProgress } from '@remotion/serverless';
2
- import type { Privacy } from '@remotion/serverless/client';
3
- import type { AwsRegion } from '../regions';
1
+ import type { AwsRegion } from '@remotion/lambda-client';
2
+ import type { Privacy, UploadDirProgress } from '@remotion/serverless';
4
3
  export type MockFile = {
5
4
  name: string;
6
5
  content: string;