patternMinor
AWS CLI --profile with duration > 1h
Viewed 0 times
withprofilecliawsduration
Problem
With the AWS CLI you can assume a role using the
e.g.:
That profile can be an AWS role that os to be assumed. My problem with that is that the session of the role is only valid for one hour by default. Is there a way of explicitly setting the session duration without using the
--profile parameter:aws --profile e.g.:
aws --profile admin s3 ls s3://mybucket/That profile can be an AWS role that os to be assumed. My problem with that is that the session of the role is only valid for one hour by default. Is there a way of explicitly setting the session duration without using the
sts service directly?Solution
You can set a maximum duration of up to 12 hours in the IAM Role config:
Hope that helps.
Hope that helps.
Context
StackExchange DevOps Q#5042, answer score: 1
Revisions (0)
No revisions yet.