metadata_service_timeout - AWS SDKs and Tools

metadata_service_timeout

Specifies the number of seconds before timing out when attempting to retrieve data from the instance metadata service.

Details

When attempting to retrieve credentials on an Amazon EC2 instance that has been configured with an IAM role, the connection to the instance metadata service times out after one second by default. If you know you're running on an Amazon EC2 instance with an IAM role configured, you can increase this value, if needed.

Ways to set this value

Location Supported Example
config file Yes
metadata_service_timeout=10
credentials file -
Environment variable Yes Linux/macOS:
export AWS_METADATA_SERVICE_TIMEOUT=10
Windows:
setx AWS_METADATA_SERVICE_TIMEOUT 10
AWS CLI parameter -

Compatibility with AWS SDKS and tools