Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Compat = "4.11"
GitHub = "5"
HTTP = "1"
IniFile = "0.5"
JSON = "0.18, 0.19, 0.20, 0.21"
JSON = "0.18, 0.19, 0.20, 0.21, 1"
MbedTLS = "0.6, 0.7, 1"
Mocking = "0.7, 0.8"
OrderedCollections = "1.3"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,4 @@ As well as some hand-written packages for specific AWS services:
* [AWSEC2.jl](https://github.com/samoconnor/AWSEC2.jl) - Julia 0.6
* [AWSLambda.jl](https://github.com/samoconnor/AWSLambda.jl) - Julia 0.6
* [AWSSES.jl](https://github.com/samoconnor/AWSSES.jl) - Julia 0.6
* [AWSSDB.jl](https://github.com/samoconnor/AWSSDB.jl) - Julia 0.6
* [AWSSDB.jl](https://github.com/samoconnor/AWSSDB.jl) - Julia 0.6
6 changes: 3 additions & 3 deletions src/AWSCredentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ function ec2_instance_credentials(profile::AbstractString)

info = IMDS.get("/latest/meta-data/iam/info")
info === nothing && return nothing
info = JSON.parse(info)
info = JSON.parse(info; dicttype=Dict)

# Get credentials for the role associated to the instance via instance profile.
name = IMDS.get("/latest/meta-data/iam/security-credentials/")
creds = IMDS.get("/latest/meta-data/iam/security-credentials/$name")
parsed = JSON.parse(creds)
parsed = JSON.parse(creds; dicttype=Dict)
instance_profile_creds = AWSCredentials(
parsed["AccessKeyId"],
parsed["SecretAccessKey"],
Expand Down Expand Up @@ -332,7 +332,7 @@ function ecs_instance_credentials()
rethrow()
end
new_creds = String(response.body)
new_creds = JSON.parse(new_creds)
new_creds = JSON.parse(new_creds; dicttype=Dict)

expiry = DateTime(rstrip(new_creds["Expiration"], 'Z'))

Expand Down
4 changes: 2 additions & 2 deletions src/AWSExceptions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ function AWSException(e::HTTP.StatusError, body::AbstractString)
if !isempty(body)
# Extract API error code from Lambda-style JSON error message...
if endswith(content_type, "json")
info = JSON.parse(body)
info = JSON.parse(body; dicttype=Dict)
end

# Extract API error code from JSON error message...
if occursin(r"^application/x-amz-json-1\.[01]$", content_type)
info = JSON.parse(body)
info = JSON.parse(body; dicttype=Dict)
if haskey(info, "__type")
code = rsplit(info["__type"], '#'; limit=2)[end]
end
Expand Down
Loading