You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/aws-cdk-lib/aws-cloudfront-origins/README.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -73,15 +73,17 @@ new cloudfront.Distribution(this, 'myDist', {
73
73
74
74
When creating a standard S3 origin using `origins.S3BucketOrigin.withOriginAccessControl()`, an [Origin Access Control resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-originaccesscontrol-originaccesscontrolconfig.html) is automatically created with the origin type set to `s3` and signing behavior set to `always`.
75
75
76
-
You can grant read, list, write or delete access to the OAC using the `originAccessLevels` property:
76
+
You can grant read, read versioned, list, write or delete access to the OAC using the `originAccessLevels` property:
'To avoid a circular dependency between the KMS key, Bucket, and Distribution during the initial deployment, '+
383
-
'a wildcard is used in the Key policy condition to match all Distribution IDs.\n'+
384
-
'After deploying once, it is strongly recommended to further scope down the policy for best security practices by '+
385
-
'following the guidance in the "Using OAC for a SSE-KMS encrypted S3 origin" section in the module README. [ack: @aws-cdk/aws-cloudfront-origins:wildcardKeyPolicyForOac]');
383
+
'a wildcard is used in the Key policy condition to match all Distribution IDs.\n'+
384
+
'After deploying once, it is strongly recommended to further scope down the policy for best security practices by '+
385
+
'following the guidance in the "Using OAC for a SSE-KMS encrypted S3 origin" section in the module README. [ack: @aws-cdk/aws-cloudfront-origins:wildcardKeyPolicyForOac]');
386
386
});
387
387
388
388
it('should allow users to use escape hatch to scope down KMS key policy to specific distribution id',()=>{
'Cannot update key policy of an imported key. You will need to update the policy manually instead.\n'+
478
-
'See the "Updating imported key policies" section of the module\'s README for more info. [ack: @aws-cdk/aws-cloudfront-origins:updateImportedKeyPolicyOac]');
478
+
'See the "Updating imported key policies" section of the module\'s README for more info. [ack: @aws-cdk/aws-cloudfront-origins:updateImportedKeyPolicyOac]');
'Cannot update bucket policy of an imported bucket. You will need to update the policy manually instead.\n'+
719
-
'See the "Setting up OAC with imported S3 buckets" section of module\'s README for more info. [ack: @aws-cdk/aws-cloudfront-origins:updateImportedBucketPolicyOac]');
719
+
'See the "Setting up OAC with imported S3 buckets" section of module\'s README for more info. [ack: @aws-cdk/aws-cloudfront-origins:updateImportedBucketPolicyOac]');
720
720
});
721
721
722
722
it('should match expected template resources',()=>{
'Cannot update bucket policy of an imported bucket. You will need to update the policy manually instead.\n'+
1232
-
'See the "Setting up OAI with imported S3 buckets (legacy)" section of module\'s README for more info. [ack: @aws-cdk/aws-cloudfront-origins:updateImportedBucketPolicyOai]');
1274
+
'See the "Setting up OAI with imported S3 buckets (legacy)" section of module\'s README for more info. [ack: @aws-cdk/aws-cloudfront-origins:updateImportedBucketPolicyOai]');
1233
1275
});
1234
1276
1235
1277
it('should create OAI in bucket stack and output it, then reference the output in the distribution stack',()=>{
0 commit comments