I am using the AWS CLI to communicate with my AWS account. I start by assuming a role in my AWS account with a command like this:
aws sts assume-role \
--role-arn arn:aws:iam::000011112222:role/MyRole \
--role-session-name my_session_name \
--serial-number arn:aws:iam::333344445555:mfa/me \
--token-code [redacted] \
--duration-seconds 21600
At a later point I would like to use the AWS CLI to query AWS to understand how much time I have left in my role before the role expires.
Does an AWS CLI command exist for this purpose?