I am using a wrapper that gets me an aws session using some sort of sso login. I can see that session in ~/aws/credentials – I need my tooling (preferably either python boto3 or shell script using aws client) to understand when that session will finish. The session information in the credentials file doesnt have any expiry values.
at the moment I’m just polling aws sts get-caller-identity every second until it goes bang – but that’s quite heavy – it would be nice to know that it’s going to be an hour or something and not do anything until then?
1