Skip to content

🎥 Make videos programmatically with React

document deleteRender()

Jonny Burger2b58071b873d
diff --git a/packages/docs/docs/lambda/deleterender.md b/packages/docs/docs/lambda/deleterender.md
new file mode 100644
index 0000000000..d8d24e3637
--- /dev/null
+++ b/packages/docs/docs/lambda/deleterender.md
@@ -0,0 +1,55 @@
+---
+id: deleterender
+title: deleteRender()
+slug: /lambda/deleterender
+---
+
+Deletes a rendered video, audio or still and it's associated metada.
+
+```ts twoslash
+// @module: ESNext
+// @target: ESNext
+import { deleteRender } from "@remotion/lambda";
+
+const { sizeInBytes } = await deleteRender({
+ bucketName: "remotionlambda-r42fs9fk",
+ region: "us-east-1",
+ renderId: "8hfxlw",
+});
+
+console.log(sizeInBytes); // 21249541
+```
+
+## Arguments
+
+An object with the following properties:
+
+### `region`
+
+The [AWS region](/docs/lambda/region-selection) in which the render has performed.
+
+### `bucketName`
+
+The bucket name in which the render was stored. This should be the same variable you used for [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) or [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda).
+
+### `renderId`
+
+The ID of the render. You can retrieve this ID by calling [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) or [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda).
+
+### `customCredentials`
+
+_optional, available from v3.2.23_
+
+If the render was saved to a [different cloud](/docs/lambda/custom-destination#saving-to-another-cloud), pass an object with the same `endpoint`, `accessKeyId` and `secretAccessKey` as you passed to [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda#outname) or [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda#outname).
+
+## Return value
+
+Returns a promise resolving to an object with the following properties:
+
+### `sizeInBytes`
+
+The amount of bytes that were removed from the S3 bucket.
+
+## See also
+
+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/lambda/src/api/delete-render.ts)
diff --git a/packages/docs/docs/lambda/downloadmedia.md b/packages/docs/docs/lambda/downloadmedia.md
index 0241dc35a7..788cd49fc3 100644
--- a/packages/docs/docs/lambda/downloadmedia.md
+++ b/packages/docs/docs/lambda/downloadmedia.md
@@ -39,7 +39,7 @@ The [AWS region](/docs/lambda/region-selection) in which the render has performe
### `bucketName`
-The bucket name in which you the render was stored. This should be the same variable you used for `renderMediaOnLambda()`.
+The bucket name in which the render was stored. This should be the same variable you used for [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) or [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda).
### `renderId`
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index c104ab7c5b..23e904294f 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -161,6 +161,7 @@ module.exports = {
"lambda/getregions",
"lambda/getsites",
"lambda/downloadmedia",
+ "lambda/deleterender",
"lambda/getuserpolicy",
"lambda/getrolepolicy",
"lambda/getorcreatebucket",