The tokens must be cleared after the session expired, so they can be renewed again.
unset AWS_SESSION_TOKEN
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
if not, the script will try to get the tokens with the expired session:
An error occurred (ExpiredToken) when calling the AssumeRole operation: The security token included in the request is expired
The tokens must be cleared after the session expired, so they can be renewed again.
unset AWS_SESSION_TOKEN
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
if not, the script will try to get the tokens with the expired session: