Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creates an AmazonEC2Client with an AWSCredentialsProvider instead of the
AWSCredentials directly. This is done so the credentials will refresh instead of expire. Resolves JENKINS-26854. At the moment, in EC2Cloud we create an AmazonEC2Client by passing in the credentials directly. This creates a StaticCredentialsProvider using the given credentials. StaticCredentialsProvider never refreshes its credentials, leading to expiration. Instead, you can create an AmazonEC2Client with a credentials provider directly. This refreshes the credentials as needed. See http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-roles.html for more information.AWSCredentials directly. This is done so the credentials will refresh instead of expire.
- Loading branch information