🎥 Make videos programmatically with React
advisory
Jonny Burger84c9871b8c63
diff --git a/packages/docs/docs/lambda/s3-public-access.md b/packages/docs/docs/lambda/s3-public-access.mdnew file mode 100644index 0000000000..5e80e18241--- /dev/null+++ b/packages/docs/docs/lambda/s3-public-access.md@@ -0,0 +1,68 @@+---+image: /generated/articles-docs-lambda-s3-public-access.png+title: Cannot create a S3 bucket using Remotion+sidebar_label: Cannot create public bucket+crumb: DevOps advisory+---++import {UserPolicy} from '../../components/lambda/user-permissions.tsx';++Since approximately April 25th 2023, AWS blocks the creation of public buckets without extra configuration, making it impossible to create new S3 buckets with Remotion version v3.3.86 and older.++To make bucket creation work again, you need to upgrade to a newer Remotion version and update your user policy.++## Problem++Users might see an error:++```bash+InvalidBucketAclWithObjectOwnership: Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting.+```++or++```bash+AccessDenied: Access Denied+```++coming from the AWS SDK when trying to create a new site or bucket.++## Cause++AWS does make all buckets private by default and Remotion tries to create a public bucket.++## Resolution++<Step>1</Step> Upgrade to Remotion <code>v3.3.87</code> or later. <br/><br/>++```bash+npx remotion upgrade+```++:::note+Note: When you upgrade Remotion, you will need to deploy new functions as well.+:::++<Step>2</Step> change your policies to give your user the <code> s3:PutBucketOwnershipControls</code> and <code>s3:PutBucketPublicAccessBlock</code> permission. The easiest way is to copy the following user policy: <br/><br/>++<details>+<summary>Show full user permissions JSON file for latest Remotion Lambda version+</summary>+<UserPolicy />+</details>++or type in `npx remotion lambda policies user` after upgrading Remotion Lambda.++Go to the [Users](https://us-east-1.console.aws.amazon.com/iamv2/home?region=us-east-1#/users) section in the AWS console and overwrite the JSON policy of your Remotion Lambda user with the above copied JSON.++You can verify that it worked by running `npx remotion lambda policies validate`.++<Step>3</Step> Redeploy your functions. You don't need to delete your old functions as it might cause downtime for your application. <br/>++<Step>4</Step> As a reminder, you also need to redeploy your site when you upgrade to a higher Remotion version. <br/>++<Step>5</Step> If any values are hardcoded, update the function and site name in your application code.++## Questions?++Join our [Discord](https://remotion.dev/discord) community to get help from the Remotion team and other users.diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex f95c34c54d..2009cb7a74 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -458,6 +458,7 @@ module.exports = {"lambda/upgrading","lambda/uninstall","lambda/feb-2023-incident",+ "lambda/s3-public-access",],},{diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex f02f2e1e72..7c287f5e33 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -874,6 +874,13 @@ export const articles = [compId: "articles-docs-lambda-runtime",crumb: "Lambda",},+ {+ id: "lambda/s3-public-access",+ title: "Cannot create a S3 bucket using Remotion",+ relativePath: "docs/lambda/s3-public-access.md",+ compId: "articles-docs-lambda-s3-public-access",+ crumb: "DevOps advisory",+ },{id: "lambda/serverless-framework-integration",title: "Using the Serverless Framework with Remotion Lambda",diff --git a/packages/docs/static/generated/articles-docs-lambda-s3-public-access.png b/packages/docs/static/generated/articles-docs-lambda-s3-public-access.pngnew file mode 100644index 0000000000..d40a664f5fBinary files /dev/null and b/packages/docs/static/generated/articles-docs-lambda-s3-public-access.png differdiff --git a/packages/lambda/src/api/create-bucket.ts b/packages/lambda/src/api/create-bucket.tsindex 553dbd77c9..d94726a959 100644--- a/packages/lambda/src/api/create-bucket.ts+++ b/packages/lambda/src/api/create-bucket.ts@@ -29,7 +29,7 @@ export const createBucket = async ({} catch (err) {if ((err as Error).message.includes('Access Denied')) {throw new Error(- 'Since April 2023, more AWS permissions are required to create an S3 bucket. You need to update your user policy to continue.'+ 'Since April 2023, more AWS permissions are required to create an S3 bucket. You need to update your user policy to continue. See https://remotion.dev/docs/lambda/s3-public-access for instructions on how to resolve this issue.');}@@ -45,7 +45,7 @@ export const createBucket = async ({} catch (err) {if ((err as Error).message.includes('Access Denied')) {throw new Error(- 'PARTIAL SUCCESS: Since April 2023, more AWS permissions are required to create an S3 bucket. You need to update your user policy to continue.'+ 'PARTIAL SUCCESS: The s3:PutBucketOwnershipControls was found, but the s3:PutBucketPublicAccessBlock permission is not given. Since April 2023, more AWS permissions are required to create an S3 bucket. You need to update your user policy to continue. You need to update your user policy to continue. See https://remotion.dev/docs/lambda/s3-public-access for instructions on how to resolve this issue.');}