Skip to content

🎥 Make videos programmatically with React

`@remotion/lambda`: Add getAwsClient() to Light ciient

Jonny Burger81ba9b734e97
diff --git a/packages/docs/docs/lambda/getawsclient.md b/packages/docs/docs/lambda/getawsclient.md
index 797c71f42d..d50ed9c72c 100644
--- a/packages/docs/docs/lambda/getawsclient.md
+++ b/packages/docs/docs/lambda/getawsclient.md
@@ -9,8 +9,9 @@ This API exposes full access to the AWS SDK that Remotion uses under the hood. Y
## Example: Getting a buffer for a render
-```tsx {18-27}
-import { getAwsClient, getRenderProgress } from "@remotion/lambda";
+```tsx {19-28}
+// Import from "@remotion/lambda" instead before Remotion v4.0.60
+import { getAwsClient, getRenderProgress } from "@remotion/lambda/client";
import { Readable } from "stream";
const bucketName = "remotionlambda-d9mafgx";
@@ -34,7 +35,7 @@ const getFileAsBuffer = async () => {
new sdk.GetObjectCommand({
Bucket: bucketName,
Key: progress.outKey,
- })
+ }),
);
return data.Body as Readable;
@@ -44,7 +45,8 @@ const getFileAsBuffer = async () => {
## Example: Enable CORS for a bucket
```tsx
-import { getAwsClient } from "@remotion/lambda";
+// Import from "@remotion/lambda" instead before Remotion v4.0.60
+import { getAwsClient } from "@remotion/lambda/client";
const { client, sdk } = getAwsClient({ region: "us-east-1", service: "s3" });
@@ -60,7 +62,7 @@ client.send(
},
],
},
- })
+ }),
);
```
@@ -121,3 +123,4 @@ You don't need to create a new client from the SDK and should instead reuse the
## See also
- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/lambda/src/api/get-aws-client.ts)
+- [Light client](/docs/lambda/light-client)
diff --git a/packages/docs/docs/lambda/light-client.md b/packages/docs/docs/lambda/light-client.md
index 848942fe84..d4062e2880 100644
--- a/packages/docs/docs/lambda/light-client.md
+++ b/packages/docs/docs/lambda/light-client.md
@@ -24,6 +24,8 @@ import {
PresignUrlInput,
getSites,
speculateFunctionName,
+ getServiceClient, // available from v4.0.60
+ CustomCredentials, // available from v4.0.60
} from "@remotion/lambda/client";
```
diff --git a/packages/lambda/src/client.ts b/packages/lambda/src/client.ts
index e208c4b704..4c84e8fd03 100644
--- a/packages/lambda/src/client.ts
+++ b/packages/lambda/src/client.ts
@@ -26,6 +26,7 @@ import type {AwsRegion} from './pricing/aws-regions';
import type {RenderProgress} from './shared/constants';
import type {WebhookPayload} from './shared/invoke-webhook';
+export {CustomCredentials, getServiceClient} from './shared/aws-clients';
export {
renderVideoOnLambda,
renderMediaOnLambda,