Skip to content

Commit

Permalink
Merge pull request #21 from invenia/instance-creds-fix
Browse files Browse the repository at this point in the history
Get instance credentials working with HTTP.jl 0.6
  • Loading branch information
samoconnor authored Feb 14, 2018
2 parents 1d99983 + 1f863a1 commit c3b65aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AWSCredentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function ec2_metadata(key)

@assert localhost_is_ec2()

String(take!(http_get("http://169.254.169.254/latest/meta-data/$key")))
String(http_get("http://169.254.169.254/latest/meta-data/$key").body)
end


Expand Down Expand Up @@ -216,7 +216,7 @@ function ecs_instance_credentials()

uri = ENV["AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"]

new_creds = JSON.parse(String(take!(http_get("http://169.254.170.2$uri"))))
new_creds = JSON.parse(String(http_get("http://169.254.170.2$uri").body))

if debug_level > 0
print("Loading AWSCredentials from ECS metadata... ")
Expand Down

0 comments on commit c3b65aa

Please sign in to comment.