Remove boolean check for underscore in IAM role (#38664)
Underscore is a valid character in an IAM role, per the docs https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html
This commit is contained in:
parent
ed25b56772
commit
bed5f7317d
1 changed files with 1 additions and 1 deletions
|
@ -458,7 +458,7 @@ class Ec2Metadata(object):
|
|||
new_fields = {}
|
||||
for key, value in fields.items():
|
||||
split_fields = key[len(uri):].split('/')
|
||||
if len(split_fields) == 3 and split_fields[0:2] == ['iam', 'security-credentials'] and '_' not in split_fields[2]:
|
||||
if len(split_fields) == 3 and split_fields[0:2] == ['iam', 'security-credentials']:
|
||||
new_fields[self._prefix % "iam-instance-profile-role"] = split_fields[2]
|
||||
if len(split_fields) > 1 and split_fields[1]:
|
||||
new_key = "-".join(split_fields)
|
||||
|
|
Loading…
Reference in a new issue