Skip to content

Commit

Permalink
Merge #535
Browse files Browse the repository at this point in the history
535: Treat 'RoleArn' as an optional field when fetching ECS credentials r=mattBrzezinski a=cole-p

Port the following changes made to AWSCore.jl: JuliaCloud/AWSCore.jl#139

> The [ECS developers guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) implies that the `RoleArn` field should always be returned when querying the container's credential endpoint, however this isn't always the case for Amazon SageMaker jobs.
>
>Amazon avoids this in [botocore](https://github.com/boto/botocore/blob/21b06efb39da61fe4101ab9709140dc1e51dc33d/botocore/credentials.py#L1886-L1889) by not accessing the `RoleArn` field.

Co-authored-by: Cole Peters <[email protected]>
  • Loading branch information
bors[bot] and cole-p authored Mar 10, 2022
2 parents cb11877 + e16bc35 commit 6080e9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AWS"
uuid = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc"
license = "MIT"
version = "1.74.0"
version = "1.74.1"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
3 changes: 2 additions & 1 deletion src/AWSCredentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ function ecs_instance_credentials()
new_creds["AccessKeyId"],
new_creds["SecretAccessKey"],
new_creds["Token"],
new_creds["RoleArn"];
# The RoleArn field may not be present for Amazon SageMaker jobs
get(new_creds, "RoleArn", "");
expiry=expiry,
renew=ecs_instance_credentials,
)
Expand Down

2 comments on commit 6080e9d

@mattBrzezinski
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/56379

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.74.1 -m "<description of version>" 6080e9d342d2e38eb92122aaedd2d1cfb813fead
git push origin v1.74.1

Please sign in to comment.