1 Answer
- Newest
- Most votes
- Most comments
0
If you are using AWS CLI profile, you can set time in the profile as shown below.
[profile my-profile]
role_arn = arn:aws:iam::123456789012:role/MyRole
source_profile = default
**duration_seconds **= 43200
Refer: https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html
If you are using an IAM role, you can set the **MaxSessionDuration **property. CloudFormation reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-maxsessionduration
