duration_seconds - AWS SDKs and Tools


Specifies the maximum duration of the role session, in seconds.


This setting applies only when the profile specifies to assume a role.

Default value: 3600 seconds (one hour)

Valid values: The value can range from 900 seconds (15 minutes) up to the maximum session duration setting configured for the role (which can be a maximum of 43200 seconds, or 12 hours). For more information, see View the Maximum Session Duration Setting for a Role in the IAM User Guide.

Ways to set this value

Location Supported Example
config file Yes
duration_seconds = 43200
credentials file -
Environment variable -
AWS CLI parameter -

Compatibility with AWS SDKS and tools