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

TS - Can't add MaxSessionDuration to a role (for an AssumeRole) #543

Closed
tolnai opened this issue Aug 10, 2018 · 1 comment · Fixed by #545
Closed

TS - Can't add MaxSessionDuration to a role (for an AssumeRole) #543

tolnai opened this issue Aug 10, 2018 · 1 comment · Fixed by #545

Comments

@tolnai
Copy link

tolnai commented Aug 10, 2018

I'm trying to create a role with an AssumeRolePolicyDocument and MaxSessionDuration specified, but I think it's not possible (using latest 0.8.1 version).

The RoleResource class uses RoleResourceProps, which is aware of the maxSessionDuration property, but when the RoleResource is created within the Role constructor, that property is simply not used. The Role constructor specifies assumeRolePolicyDocument, managedPolicyArns, path and roleName explicitly, and there is no way to pass in further properties through RoleProps. Also, this RoleResource instance cannot be changed in any ways with methods of the Role class.

https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/aws-iam/lib/role.ts#L88

Is there a reason why this property has been left out, or is it just missing? Could it be added?

Thanks!

eladb pushed a commit that referenced this issue Aug 12, 2018
Allow specifying a maximum session duration for roles.

Fixes #543
@eladb
Copy link
Contributor

eladb commented Aug 12, 2018

Pull request submitted

eladb pushed a commit that referenced this issue Aug 13, 2018
Allow specifying a maximum session duration for roles.

Fixes #543
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants