mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Minor fix
https://github.com/rubygems/rubygems/commit/95c1f4e179
This commit is contained in:
parent
565828a778
commit
0b9b0774c3
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ class Gem::S3URISigner
|
|||
|
||||
iam_info = ec2_metadata_request(EC2_IAM_INFO)
|
||||
# Expected format: arn:aws:iam::<id>:instance-profile/<role_name>
|
||||
role_name = iam_info['InstanceProfileArn'].split('/')[1]
|
||||
role_name = iam_info['InstanceProfileArn'].split('/').last
|
||||
ec2_metadata_request(EC2_IAM_SECURITY_CREDENTIALS + role_name)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue