aws / aws/aws-toolkit-vscode

Credentials: reload from environment variables when expired

Open
#2,029 12 comments 1 reaction 0 assignees View on GitHub
auth-credentials environment-variables feature-request needs-response
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 in env:variables

**To Reproduce**

After installing and ctrl+shift+p -> connect to AWS on a machine that already has a credentials details in env:variables with MFA enabled. Wait for the session token to expire. Create new credentials and store them in env:variables. Selecting either of env:variables and any other profiles returns an error "Credentials profile is invalid"

**Expected behavior**

AWS connects with env:varaiables when it is updated and valid, since Aggressive caching is fixed in version 1.6.0.

**Screenshots**

![image](https://user-images.githubusercontent.com/90760442/133407804-730c6e7a-0388-4612-aadf-c8a111e27f2e.png)

**Desktop (please complete the following information):**
- OS: Windows 10
- Visual Studio Code Version: 1.60.1
- AWS Toolkit Version: 1.29.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the expired-session scenario in the VS Code command that connects to AWS, using updated environment-variable credentials after the token expires. Trace how the selected environment credentials are loaded and cached; done means valid refreshed credentials connect successfully instead of producing “Credentials profile is invalid.”

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
authentication, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.