Using environment variables - AWS SDKs and Tools Shared Configuration and Credentials

Using environment variables

This topic lists the supported environment variables that some SDKs and tools enable you to use in place of settings in the shared config and credentials files.

Note

Not all SDKs and Tools that support a Config setting support the equivalent environment variable setting. See the details page for a Config setting for more information.

The listing for each variable links back to the Settings page for details about what that variable does.

Environment variable Description or link to Config setting and reference
AWS_ACCESS_KEY_ID aws_access_key_id
AWS_CA_BUNDLE ca_bundle
AWS_DEFAULT_OUTPUT output
AWS_CONFIG_FILE Specifies the path to the shared config file. The default value is ~/.aws/config. Change this only if you want to move the file to a different location.
AWS_DEFAULT_REGION region
AWS_MAX_ATTEMPTS max_attempts
AWS_METADATA_SERVICE_NUM_ATTEMPTS metadata_service_num_attempts
AWS_METADATA_SERVICE_TIMEOUT metadata_service_timeout
AWS_PROFILE Specifies which profile is the default profile. The default value if this is not specified is [default].
AWS_RETRY_MODE retry_mode
AWS_SECRET_ACCESS_KEY aws_secret_access_key
AWS_SESSION_TOKEN aws_session_token
AWS_SHARED_CREDENTIALS_FILE Specifies the path to the shared credentials file. The default value is ~/.aws/credentials. Change this only if you want to move the file to a different location.
AWS_STS_REGIONAL_ENDPOINTS sts_regional_endpoints
CA_BUNDLE ca_bundle