How to pass credentials in Glue Notebooks - Interactive Session using Magic Commands to override the 1 hour temporary token expiration

0

Hi, If I start the notebook via the console the token/credentials expire after one hour, Gives 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 " .

I am guessing this is happening since its using temporary credentials by default. How does one pass the credentials using the magic commands such that credentials do not expire or workaround?

I can run notebooks locally using the profile in local .aws folder, but can't use TAGS for the sessions to account for costs.

質問済み 2年前491ビュー
1回答
0

From the console Glue notebook, I tried running %iam_role my-glue-role magic to reset the IAM role and that seemed to do the trick.

You are already connected to session axxxxxxx-2xxxx-4xxx-bxxx-0xxxxxxx. Your change will not reflect in the current session, but it will affect future new sessions. 

Current iam_role is arn:aws:iam::xxxxxxxxx:role/my-glue-role
iam_role has been set to my-glue-role.

If you are doing it using an API in your computer, you can increase the maximum session duration expiration for temporary credentials for IAM roles using the DurationSeconds parameter for your use case.

profile pictureAWS
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ