Skip to content
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

Support Typescript to generate IAM Policies #69

Open
thantos opened this issue Mar 31, 2022 · 1 comment
Open

Support Typescript to generate IAM Policies #69

thantos opened this issue Mar 31, 2022 · 1 comment
Labels
enhancement New feature or request iam

Comments

@thantos
Copy link
Collaborator

thantos commented Mar 31, 2022

new IamPolicy.EventBridge(identity => {
    if(identity.eventBridge.sourceAccount === "..." && arnAllowList.includes(identity.resource)) {
        return IamPolicy.EventBridge.CreateRule & IamPolicy.EventBridge.DeleteRule;
    }
    return false;
})

or

new Policy((principal) => {
  if (principal.sourceAccountId === '...') {
    return bucket.grantRead(principal);
  } else {
    return denyAll()
  }
})
@thantos thantos added enhancement New feature or request iam labels Mar 31, 2022
@sam-goodwin
Copy link
Collaborator

That is a beautiful idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request iam
Projects
None yet
Development

No branches or pull requests

2 participants