This repository was archived by the owner on Mar 4, 2021. It is now read-only.
Adding Role policy handling in addition to explicitly set user credentials #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changed all usages of AWS SDK client constructors with credentials to use the default constructor, such that credentials are chosen in the following order:
(taken from: http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-roles.html)
If the credentials are set explicitly within the client.properties, they are exposed as Java System property and will as such be picked up by the AWS SDK call. Should the property not exist, be empty or only hold spaces, then the InstanceProfileCredentialsProvider is used. It uses credentials provided by the Instance Meta Data Service, we can not store these within the code as such are rotated and will be rechecked for every time an SDK call is made. Hence the removal of all in memory storage of the credentials and deprecation of their getters. Also deprecated the constructor taking credentials as arguments in favor of the one establishing the credentials via the AWS SDK.
kind regards
DrGranit