This topic describes how to use the console or API to set the maximum session duration for a RAM role. If you set the maximum session duration to a large value for a RAM role, RAM users can assume the RAM role to complete time-consuming tasks. If the RAM users call an STS API operation to assume the RAM role, the STS tokens that are returned have a long validity period.
- The maximum session duration for a RAM role ranges from 3,600 seconds to 43,200 seconds. The default maximum session duration is 3,600 seconds.
- The maximum session duration of service linked roles is not configurable.
Use the console to set the maximum session duration for a RAM role
- Log on to the RAM console with an Alibaba Cloud account.
- In the left-side navigation pane, click RAM Roles.
- On the RAM Roles page, click the name of a RAM role in the RAM Role Name column.
- In the Basic Information section, click Edit next to Maximum Session Duration.
- In the dialog box that appears, modify the maximum session duration and click OK.