You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my case, the script only works when launch the first time. Then there is an authentication issue and it cannot creates new keys (nor do anything in AWS in fact).
I found after the script is run a first time, 2 profiles "default" exist and can be displayed with the command Get-AWSCredentials -ListProfileDetail:
I suspect that somehow, when the script updates the profiles, it succeeds for the SharedCredentialsFile but it fails for the NetSDKCredentialsFile. Manually removing the NetSDKCredentialsFile with the command Remove-AWSCredentialProfile -ProfileName default is a workaround to make the script work again once.
The text was updated successfully, but these errors were encountered:
A (dirty?) way to fix this issue is to comment the line Set-AWSCredential -StoreAs $profile -AccessKey $new_key.AccessKeyId -SecretKey $new_key.SecretAccessKey in the script to only keep the 1st one that update the ProfileLocation (so the SharedCredentialsFile).
I'm not sure what this 2nd line is for (updating SDK credentials ?) and it seems other people are not complaining about so I don't create a PR for this. But I see 2 reasons that it could be linked to: either MFA setup or usage on a non standard region (I'm on China region). The issue #65 could also be caused by that as I had very similar authentication error message.
On my case, the script only works when launch the first time. Then there is an authentication issue and it cannot creates new keys (nor do anything in AWS in fact).
I found after the script is run a first time, 2 profiles "default" exist and can be displayed with the command
Get-AWSCredentials -ListProfileDetail
:I suspect that somehow, when the script updates the profiles, it succeeds for the SharedCredentialsFile but it fails for the NetSDKCredentialsFile. Manually removing the NetSDKCredentialsFile with the command
Remove-AWSCredentialProfile -ProfileName default
is a workaround to make the script work again once.The text was updated successfully, but these errors were encountered: