1 Answer
- Newest
- Most votes
- Most comments
0
Hello,
From the following error:
Exception encountered while retrieving session: An error occurred (ExpiredTokenException) when calling the GetSession operation: The security token included in the request is expired
It seems like the assumed role is being timed out and the credentials need to be refreshed. By default, the value is set to 3600 seconds.
You can try checking the session timeout value for the IAM role that you are using to run the notebook and consider increasing the maximum session duration on the IAM console. The steps to view the duration and make changes to it are as follows:
- Locate the IAM console home page.
- Click on the Roles tab on the left of the screen.
- Locate the role you wish to view/modify.
- In the summary section, it will tell you the duration of that role before you need to refresh the credentials of that role.
- If you wish to modify the duration, under the Delete button on the right side, there is an Edit button. Click on the Edit button and you are able to make changes to the session duration for that role. Click save changes once the desired duration has been picked.
Requesting you to please test this and check if you see the same error again after increasing session duration for the role.
Reference: [1] https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 6 months ago
Thank you. We don't have permissions to modify that value, so I have to re-establish the credentials every hour. I do that in a separate command window. My question was about, how do I associate the the new session with already running Jupyter notebook after I refresh the credentials? Is that possible?