-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-cloudfront-origins): Enable S3 versioned access for OAC #33034
Comments
Makes sense to me. We welcome the PRs and let address this issue from there. |
This allows creating an S3 bucket origin OriginAccessControl for access of versioned objects Fixes aws#33034
This allows creating an S3 bucket origin OriginAccessControl for access of versioned objects Fixes aws#33034
This allows creating an S3 bucket origin OriginAccessControl for access of versioned objects Fixes aws#33034
This allows creating an S3 bucket origin OriginAccessControl for access of versioned objects Fixes aws#33034
This allows creating an S3 bucket origin OriginAccessControl for access of versioned objects Fixes aws#33034
@pahud My PR is open for some time now but has a failing check: This is in some generated code for the integration tests. I deleted all the generated assets, ensured using all the newest versions and regenerated everything, however there was no change to the asset that causes issues. Is there someone who could help me getting this fixed and moved forward? |
### Issue # (if applicable) Closes #33034 ### Reason for this change This allows creating an S3 bucket origin OriginAccessControl for access of versioned objects via CloudFront. ### Description of changes Added a new `AccessLevel.READ_VERSIONED`, to extend the list of the OAC access levels, which extends the S3 bucket policy to contain `s3:GetObjectVersion`. I followed the existing patterns for the different AccessLevels, to make the change as small as possible. This enables versioned S3 bucket origins to allow the CloudFront distribution to access object versions. ### Describe any new or updated permissions being added n/a ### Description of how you validated changes Added a new unit-test and a new integration test ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comments on closed issues and PRs are hard for our team to see. |
### Issue # (if applicable) Closes aws#33034 ### Reason for this change This allows creating an S3 bucket origin OriginAccessControl for access of versioned objects via CloudFront. ### Description of changes Added a new `AccessLevel.READ_VERSIONED`, to extend the list of the OAC access levels, which extends the S3 bucket policy to contain `s3:GetObjectVersion`. I followed the existing patterns for the different AccessLevels, to make the change as small as possible. This enables versioned S3 bucket origins to allow the CloudFront distribution to access object versions. ### Describe any new or updated permissions being added n/a ### Description of how you validated changes Added a new unit-test and a new integration test ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the feature
By calling
S3BucketOrigin.withOriginAccessControl
the access-levels only allow for adding for the bucket actions3:GetObject
but there is no way to easily adds3:GetObjectVersion
. In order to get that, the bucket permissions must be extended manually.There should be a way to extend the access levels, have a way to manually extend required actions or set a flag to enable versioned access.
Use Case
I created an S3 origin with OAC to provide a signed url and allow the
versionId
to be passed, so the user can download a specific object version. I needed to extend the bucket permission manually, by adding the action's3:GetObjectVersion'
for the distributionId.Proposed Solution
I see three possible solutions:
AccessLevel
to have aREAD_VERSIONED
versioned
in the properties on creating the OACOther Information
No response
Acknowledgements
CDK version used
2.167.1
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered: