Daily Archives: March 20, 2021

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

  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