"Connect to AWS" error: unable to get local issuer certificate
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
**Describe the bug**
Error suggesting invalid profile on machine with existing credentials file in use with aws cli
**To Reproduce**
After installing and ctrl+shift+p -> connect to AWS on a machine that already has a credentials file in the home directory, the user is given a list of profiles in the credentials file. Selecting either of my profiles returns an error "Credentials profile is invalid"
**Expected behavior**
AWS connects to that profile.
**Screenshots**


**Desktop (please complete the following information):**
- OS: Windows 10
- Visual Studio Code Version:
Version: 1.41.1 (user setup)
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:58:56.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.17763
- AWS Toolkit for Visual Studio Code Version: 1.5.0
**Additional context**
```
F:\>sam --version
SAM CLI, version 0.13.0
F:\>aws --version
aws-cli/1.17.4 Python/3.6.0 Windows/10 botocore/1.14.4
F:\>aws s3 ls
2019-12-03 14:38:40 andrew-test-s3-bucket
F:\>aws s3 ls --profile dev
2020-01-08 08:13:27 admstest
```
I read through https://github.com/aws/aws-toolkit-vscode/issues/705 which shows the same symptoms but following the recommended steps of reinstalling the latest VSCode, restarting it and having lower case credential key names didn't work for me.
Here is the content of my credential file with altered keys:
```
[default]
aws_access_key_id = BKDLSKEJFLKASKJFKELS
aws_secret_access_key = adklsfjASDfksa2+akdzADSFwekfasdfjslkedsf
[sand]
aws_access_key_id = BKDLSKEJFLKASKJFKELS
aws_secret_access_key = adklsfjASDfksa2+akdzADSFwekfasdfjslkedsf
[dev]
aws_access_key_id = SKDASDLFKJSKSKJFKELT
aws_secret_access_key = fasdfjslkedadklsfjASDfksa2+akdzADSFweksf
```
Please let me know if you have any suggestions.
Thank you!
Contributor guide
Research direction
Start from the Ctrl+Shift+P “Connect to AWS” entry point and reproduce the failure on Windows with an existing credentials file and multiple profiles. Compare the extension’s behavior with the working AWS CLI commands; done means selecting either profile connects without the invalid-profile or certificate error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- authentication, cloud, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100