Skip to content

Wrong parsing of IAM roles with '/' in role name #20

@Antar2002

Description

@Antar2002

When role name contains '/' characters it's not possible to use -r parameter for these roles because of current implementation splits ARN by '/' and compare second item from split result with value of '-r' parameter.
So in case when the role named "dep1/group2/super.role3" its arn is something like "arn:aws:iam::123456789012:role/dep1/group2/super.role3".

Please fix.

role = row.split('/')[1]

It's now
role = row.split('/')[1]
Should be
role = row.split('/',maxsplit=1)[1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions