

It will handle in-memory caching as well as refreshing credentials as needed. When you do this, Boto3 will automatically make the corresponding AssumeRole calls to AWS STS on your behalf. Within the ~/.aws/config file, you can also configure a profile to indicate that Boto3 should assume a role. This is a different set of credentials configuration than using IAM roles for EC2 instances, which is discussed in a section below. Instance metadata service on an Amazon EC2 instance that has an IAM role configured.Įach of those locations is discussed in more detail below.Boto2 config file ( /etc/boto.cfg and ~/.boto).Shared credential file ( ~/.aws/credentials).

#AUTOEXPIRE IAM ACCESS KEY HOW TO#
For more information on how to configure non-credential configurations, see the Configuration guide.īoto3 will look in several locations when searching for credentials. Non-credential configuration includes items such as which region to use or which addressing style to use for Amazon S3. Credentials include items such as aws_access_key_id, aws_secret_access_key, and aws_session_token. There are two types of configuration data in Boto3: credentials and non-credentials.
