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

Permission boundary support #36

Open
jegadeshs opened this issue Sep 20, 2022 · 2 comments
Open

Permission boundary support #36

jegadeshs opened this issue Sep 20, 2022 · 2 comments

Comments

@jegadeshs
Copy link

Do we have option to specify permission boundary ?

source: arn:aws:iam::143384653512:role/PowerTunerWebsiteStack-CustomCDKBucketDeployment86-1K0D6JG63Y5UY because no permissions boundary allows the iam:CreateRole act
ion

@mattymoomoo
Copy link
Owner

mattymoomoo commented Oct 11, 2022 via email

@mattdronen
Copy link

This is what I did in the file cdk\lib\power-tuner-stack.ts...

setupLambdaRole(scope: any): iam.Role {
const boundary = iam.ManagedPolicy.fromManagedPolicyArn(this, 'Boundary', '');
let iamRole = new iam.Role(scope, 'DefaultLambdaHanderRole', {
assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),
});
iam.PermissionsBoundary.of(iamRole).apply(boundary);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants