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
Hello,
I use a lot of creds with session tokens. Whenever I deal with a credentials file with a session token it fails.
[foo]
aws_access_key_id=
aws_secret_access_key=
aws_session_token=
Execution of 'CLI Default' command has failed: Invalid input: credentials schema is invalid.
I believe the error is here...
if (Object.keys(credentials).length !== 2 ||
!credentials.hasOwnProperty('aws_access_key_id') ||
!credentials.hasOwnProperty('aws_secret_access_key')) {
throw new Error('Invalid input: credentials schema is invalid.');
}
You might be able to fix it by simply making the !==2 be <2. This allows for any new record type AWS introduces but also captures the minimum. It assumes the AWS CLI will ignore any parameter which it doesn't need.
Thanks!
The text was updated successfully, but these errors were encountered:
so I made that change locally on my system and it worked. I didn't deal with the test cases. I just needed it to work.
I'm not sure how contributes work here. Like, is there a vetting process to be a contributor?
I believe he is talking about this file, on my windows machine inside my local profile the path is "..vscode\extensions\mark-tucker.aws-cli-configure-0.3.0\node_modules\aws-profile-handler\index.js
He's suggesting the this section should look like :
if (Object.keys(credentials).length < 2 ||
!this.isValidSchema(credentials) &&
!this.isValidAltSchema(credentials)) {
throw new Error('Invalid input: credentials schema is invalid.');
}
I've also modified this file with the suggested change and the extension now works for me with session tokens in my profiles.
Hello,
I use a lot of creds with session tokens. Whenever I deal with a credentials file with a session token it fails.
[foo]
aws_access_key_id=
aws_secret_access_key=
aws_session_token=
Execution of 'CLI Default' command has failed: Invalid input: credentials schema is invalid.
I believe the error is here...
if (Object.keys(credentials).length !== 2 ||
!credentials.hasOwnProperty('aws_access_key_id') ||
!credentials.hasOwnProperty('aws_secret_access_key')) {
throw new Error('Invalid input: credentials schema is invalid.');
}
You might be able to fix it by simply making the !==2 be <2. This allows for any new record type AWS introduces but also captures the minimum. It assumes the AWS CLI will ignore any parameter which it doesn't need.
Thanks!
The text was updated successfully, but these errors were encountered: