Skip to content

Commit

Permalink
Add note about bucket object ownership with OAC
Browse files Browse the repository at this point in the history
  • Loading branch information
gracelu0 committed Aug 19, 2024
1 parent 3cd0605 commit 9cacc58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/aws-cdk-lib/aws-cloudfront-origins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ To set up an origin using a standard S3 bucket, use the `S3BucketOrigin` class.
is handled as a bucket origin and
CloudFront's redirect and error handling will be used. It is recommended to use `S3BucketOrigin.withOriginAccessControl()` to configure OAC for your origin.

> Note: When you use CloudFront OAC with Amazon S3 bucket origins, you must set Amazon S3 Object Ownership to Bucket owner enforced (the default for new Amazon S3 buckets). If you require ACLs, use the Bucket owner preferred setting to maintain control over objects uploaded via CloudFront.
```ts
const myBucket = new s3.Bucket(this, 'myBucket');
new cloudfront.Distribution(this, 'myDist', {
Expand Down
1 change: 1 addition & 0 deletions packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,7 @@ Unlike most feature flags, we don't recommend setting this feature flag to true.
the event object, then setting this feature flag will keep this behavior. Otherwise, setting this feature flag to false will trigger an 'Update' event by removing the 'logApiResponseData'
property from the event object.


| Since | Default | Recommended |
| ----- | ----- | ----- |
| (not in v1) | | |
Expand Down

0 comments on commit 9cacc58

Please sign in to comment.