Two ways to read aws access key/secret. Different CredentialProvider

By | March 20, 2021
Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  1. instance can have instance role. When an application run in instance, it can InstanceProfileCredentialsProvider() to retrieve instance role and have the access. For example, instance_profile from EMR cluster is the role for EMR instance.
  2. StsAssumeRoleSessionCredentialsProvider
  3. AWSStaticCredentialsProvider
  4. AWSCredentialsProviderChain. It will test different credential one by one, until it finds one.

Here is a code example

Category: aws