Credentials set as environment variables

The Access Credentials can be supplied by using system environment variables.

Environment variables override configuration and credential files and can be useful for scripting or setting a named profile temporarily as the default.

Note: Setting Environment Variables varies by Operating System. For more information, see this Knowledge Base Article.
Table 1. Boto SDK supported environmental variables
Variable Purpose
AWS_ACCESS_KEY_ID AWS access key.
AWS_SECRET_ACCESS_KEY AWS secret key. Access and secret key variables override credentials that are stored in both credential and config files.
AWS_SECURITY_TOKEN Security token. A web service that requests temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users that you authenticate (federated users).
AWS_PROFILE Name of the profile to use. It can be the name of a profile that is stored in a credential or config file or default to use the default profile.
Example - Authentication by using Boto connection class constructor parameters.

s3 = boto.connect_s3( 1
  host = 'host.example.com',
  is_secure = false,
  calling_format = boto.s3.connection.OrdinaryCallingFormat(),
  )

1 The Boto SDK automatically reads the Access Key ID and Secret Access Key from the 
  Environment Variables. They do not need to be provided explicitly.