remotion-dev/remotion · error · Error
Could not add an ACL to the bucket. This might have happened
Error message
Could not add an ACL to the bucket. This might have happened because the bucket was already successfully created before but then failed to configure correctly. We recommend to delete the bucket (${bucketName}) if it is empty and start over to fix the problem. What it means
Thrown when the final PutBucketAcl fails with 'The bucket does not allow ACLs'. This happens when the bucket's ownership controls are BucketOwnerEnforced (ACLs disabled) — typically because a previous create attempt partially configured the bucket before failing. Since the ACL step cannot succeed on this bucket, the recommendation is to delete the empty bucket and start over.
Source
Thrown at packages/lambda-client/src/create-bucket.ts:114
'Could not apply a bucket policy to restrict public access to s3:GetObject only. Falling back to public-read ACL which also allows listing objects. To fix this, add the s3:PutBucketPolicy permission to your IAM user. See https://remotion.dev/docs/lambda/bucket-security',
);
}
try {
await getS3Client({
region,
customCredentials: null,
forcePathStyle,
requestHandler,
}).send(
new PutBucketAclCommand({
Bucket: bucketName,
ACL: usedBucketPolicy ? 'private' : 'public-read',
}),
);
} catch (err) {
if ((err as Error).message.includes('The bucket does not allow ACLs')) {
throw new Error(
`Could not add an ACL to the bucket. This might have happened because the bucket was already successfully created before but then failed to configure correctly. We recommend to delete the bucket (${bucketName}) if it is empty and start over to fix the problem.`,
);
}
throw err;
}
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Delete the named bucket (if empty) via the S3 console or aws s3 rb, then retry getOrCreateBucket
- If the bucket must be kept, manually set ownership to ObjectWriter/AclPreferred and re-run
- Avoid reusing a Remotion sites bucket with non-default ownership controls
Example fix
# bucket is half-configured; remove and recreate aws s3 rb s3://<bucketName> --force # only if empty/abandonable
Defensive patterns
Strategy: try-catch
Try / catch
try {
await getOrCreateBucket({...});
} catch (err) {
if ((err as Error).message.includes('Could not add an ACL to the bucket')) {
// delete the empty bucket and retry from scratch
}
throw err;
} Prevention
- Use a fresh bucket name when a previous create failed partway
- Do not pre-configure ownership controls on a Remotion sites bucket
- Clean up half-created buckets before re-running deploy
When it happens
Trigger: createBucket reaches PutBucketAcl on a bucket whose ownership is already set to BucketOwnerEnforced, so ACLs are rejected.
Common situations: A prior failed create left the bucket in a half-configured state; the bucket pre-existed with ACLs disabled; retrying getOrCreateBucket against a polluted bucket.
Related errors
- Since April 2023, more AWS permissions are required to creat
- PARTIAL SUCCESS: The s3:PutBucketOwnershipControls was found
- You don't have the required permissions to create lifecycle
- You don't have the required permissions to delete lifecycle
- Bucket owner mismatch: Expected the bucket ${bucketName} to
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/0e2ec0c6aa578db8.
Report an issue: GitHub.