istioworkshop / istio-workshop

Sources for the Istio workshop website
https://istioworkshop.github.io
8 stars 0 forks source link

Problems with accesing AWS after session has expired #1

Closed pwegrzyn closed 4 years ago

pwegrzyn commented 4 years ago

After finishing the workshop we are supposed to stop the cluster and finally destroy it. However, right when I was about the start this step:

kops get ig

I got an error saying that the session token has expired. I tried to search for some quick solutions to this problem but wasn't able to find any which actually worked. I accessed the AWS Educate classroom view and used the new credentials (which presumably got automatically created after the previous one has expired). But after swtiching to these credentials I got this issue now:

An error occurred (InvalidAccessKeyId) when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.

After logging into the AWS console web UI I can see the S3 Buckets and EC2 instances running. Is there a way to stop the cluster and destroy it through the web? Or should I able to somehow fix the issue in the CLI and then destroy the cluster as in the workshop notes?

bzurkowski commented 4 years ago

@pwegrzyn Thanks for reporting 👍

It seems that AWS Educate resets student credentials every 3 hours. In order to fix it, you must reconfigure your AWS client with new credentials available in Account details.

Please, use the following instructions:

  1. Copy-paste the credentials from Account details into ~/.aws/credentials. Note that you must copy all credentials including aws_access_key_id, aws_secret_access_key, and aws_session_token. They must be exactly the same.
  2. Reset your terminal and try to list S3 buckets again.
  3. If it does not help, re-login into AWS Educate and redo steps 1 and 2.

If the above instructions fail to solve the issue, let me know. I will provide you with instructions to delete AWS resources manually.

pwegrzyn commented 4 years ago

@bzurkowski Of all the available options I didn't try to reset the terminal, which actually turned out to resolve this issue :) Thanks, I was now able to finish destroying the cluster according to the notes.