aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.68k stars 3.93k forks source link

(aws-cloudfront): Add convenience grant methods #13159

Closed daniel-j-h closed 1 year ago

daniel-j-h commented 3 years ago

Hey hey,

ideally the cloudfront distribution would provide convenience .grant* methods, to e.g. grant a user the permissions to invalidate a distribution or get a invalidation so the can wait on it until completion.

Use Case

A common use case is creating a CI/CD user with permissions to

for example this could be a CI/CD user automatically building and publishing static assets.

Now it would be great to have functionality like

const dist = new Distribution(..);
const user = new User(...);

dist.grantCreateInvalidation(user);

or similar, instead of having to write the policy out manually.

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.