question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IAM permission boundaries

See original GitHub issue

This was originally about EKS, but we think there’s a general use case here to be able to specify an IAM permission boundary at the stack level and perhaps generally have Stack-level control over IAM roles/policies created within a stack.

See thread below.


When creating the cluster using “@aws-cdk/aws-eks” module, the CloudFormation template is generated with implicit lambda function. This lambda function is executing a python script for cluster creation. A lambda service role is also created. However, when permission boundary is enforced in AWS account, creation of lambda service role fails, as permission boundary will not be attached implicitly.

Provide an option to specify these roles explicitly.

Use Case

In some AWS tenancies, permission boundary can be enforced when creation any IAM roles. With this, implicit IAM roles cannot be created as they will not be attached with permission boundary.

In such AWS account, creation of EKS cluster using CDK fails as the lambda service role which is generated by CDK is not associated with permission boundary.

Proposed Solution

Specify permission boundary to be attached to implicit IAM roles that CDK creates

new eks.Cluster(this, "hello-eks", {
      clusterName: "test-eks-cdk",
      permissionBoundary: <ARN-OF-PERMISSION-BOUNDARY>
}

The permission boundary defined, will get assigned to the lambda IAM role.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
eladbcommented, Nov 27, 2019

I am wondering if we should allow specifying a permission boundary at the stack level which will automatically apply to all IAM roles defined within this stack. Would that make sense for your use case? @rix0rrr, @RomainMuller what do you guys think?

0reactions
rix0rrrcommented, Aug 12, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

When and where to use IAM permissions boundaries
A permissions boundary is an IAM feature that helps your centralized cloud IAM teams to safely empower your application developers to create new ......
Read more >
AWS IAM Permission Boundaries - Medium
Permission boundaries allow account administrators to set the maximum amount of permissions an IAM entity can have regardless of the permissions defined in...
Read more >
AWS Permission Boundaries for Dummies - FireMon
A permission boundary is just an IAM policy that lists the maximum privileges someone or something can have. You attach that policy and...
Read more >
Apply AWS IAM Permissions Boundary | Hands-on - YouTube
In a previous video, I taught you what an AWS IAM permissions boundary is and how you can use them to secure your...
Read more >
AWS IAM Permissions Boundaries Explained - YouTube
This was kind of a repurposed internal training that would put out there to see how much interest there was in the approach...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found