AWS 会话超时的时间设置是可调的。你可以通过在 IAM 用户的权限界面或者 AWS CLI 中设置 session 过期时间来解决这个问题。例如,在 AWS CLI 中可以使用如下命令:
aws configure set cli_follow_urlparam False
aws configure set cli_pager ""
aws configure set metadata_service_timeout 3600
aws configure set metadata_service_num_attempts 3
aws configure set preview.sso_use_sso true
aws configure set cli_sso_duration 86400
以上代码将把 session 超时时间设置为 1 小时,并且在 CLI 使用 SSO 时,SSO 会话的持续时间设置为 24 小时。你可以根据你的需求更改这些参数。
上一篇:AWS会话/凭证/认证
下一篇:AWS会话管理器欢迎消息