question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Credentials profile is invalid while trying to Connect to AWS

See original GitHub issue

Describe the bug Installed AWS toolkit for VS Code, I have my config and credentials file with the following key and their values config

[default]
region = us-west-2

credentials

[default]
AWS_ACCESS_KEY_ID=<key>
AWS_SECRET_ACCESS_KEY=<secret>
AWS_SESSION_TOKEN=<token>

Clicking on Connect to AWS using default profile will pop an error dialogue that says Credential profile default is invalid To Reproduce

Expected behavior Connection successful to AWS

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 10 Enterprise, Build 1803 (x64)
  • Visual Studio Code Version: 1.36.1
  • AWS Toolkit for Visual Studio Code Version: 1.0.0

Additional context Have tried using a named profile instead of default, the error persist

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
eugenevdcommented, Nov 18, 2020

For what it’s worth, I’ve just had the same error as the OP

$ code --version
1.51.1
e5a624b788d92b8d34d1392e4c4d9789406efe8f
x64
$ aws --version
aws-cli/1.18.180 Python/3.6.9 Linux/5.4.0-53-generic botocore/1.19.20

AWS Toolkit 1.15.0

What solved the problem for me was to change the profile entries in ~/.aws/config from [profileX] to [profile profileX]

2reactions
awschristoucommented, Aug 8, 2019

Thank you for the confirmation @jmery

  • #705 indeed will track overly aggressive caching of credentials (which requires restarting VS Code to flush)
  • I’ve created #732 to track supporting upper case keys (and made a reference to this issue)

I will close this issue, as the work will be tracked in these separate issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve issues signing in to your AWS console
You can't sign in to an AWS account because you're using incorrect credentials (email address, user name, or password), or you forgot the ......
Read more >
Setting up your AWS credentials - AWS Toolkit for VS Code
To access Amazon Web Services (AWS) with the AWS Toolkit for Visual Studio Code, you must make your AWS account credentials available to...
Read more >
Using the AWS credentials file and credential Profiles
If no credentials or profiles were explicitly provided to the SDK and no credentials were defined in environment variables, but a credentials file...
Read more >
Resolve the IAM Error "AWS was not able to validate the ...
"An error occurred (AuthFailure) when calling the DescribeInstances operation: AWS was not able to validate the provided access credentials.
Read more >
Troubleshoot errors with credentials when connecting ... - AWS
1.FSPOpen the Amazon EC2 console, and then choose Instances. · 2.FSPFind the EC2 instance that you want to connect to using SSH. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found