Cannot create a S3 bucket using Remotion
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.
bash
InvalidBucketAclWithObjectOwnership: Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting.
or
bash
AccessDenied: Access Denied
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
v3.3.87
or later.
bash
npx remotion upgrade
bash
npx remotion upgrade
Note: When you upgrade Remotion, you will need to deploy new functions as well.
s3
s3
permission. The easiest way is to copy the following user policy: Show full user permissions JSON file for latest Remotion Lambda version
or type in npx remotion lambda policies user
after upgrading Remotion Lambda.
Go to the 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
.
Questions?
Join our Discord community to get help from the Remotion team and other users.