-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-cloudfront-originsRelated to CloudFront Origins for the CDK CloudFront LibraryRelated to CloudFront Origins for the CDK CloudFront Libraryeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Describe the feature
By calling S3BucketOrigin.withOriginAccessControl the access-levels only allow for adding for the bucket action s3:GetObject but there is no way to easily add s3: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:
- Extend the enum
AccessLevelto have aREAD_VERSIONED - Add a way, to extend the policy per OAC by passing a list of actions
- Have a flag
versionedin the properties on creating the OAC
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.167.1
Environment details (OS name and version, etc.)
MacOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-cloudfront-originsRelated to CloudFront Origins for the CDK CloudFront LibraryRelated to CloudFront Origins for the CDK CloudFront Libraryeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2