in lib/role.ts [211:231]
Policies: _flatten(props.inlinePolicies),
Path: props.path,
PermissionsBoundary: this.permissionsBoundary ? this.permissionsBoundary.managedPolicyArn : undefined,
RoleName: this.physicalName,
MaxSessionDuration: maxSessionDuration,
Description: description,
}
})
this.roleId = Token.asString(role.getAtt('RoleId'));
this.roleArn = this.getResourceArnAttribute(Token.asString(role.getAtt('Arn')), {
region: '', // IAM is global in each partition
service: 'iam',
resource: 'role',
resourceName: this.physicalName,
});
this.roleName = this.getResourceNameAttribute(role.ref);
this.policyFragment = new ArnPrincipal(this.roleArn).policyFragment;
function _flatten(policies?: { [name: string]: PolicyDocument }) {
if (policies == null || Object.keys(policies).length === 0) {