Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS CredentialsProvider issue triggered by sst shell command #401

Closed
alistairstead opened this issue May 10, 2024 · 3 comments
Closed

AWS CredentialsProvider issue triggered by sst shell command #401

alistairstead opened this issue May 10, 2024 · 3 comments
Assignees

Comments

@alistairstead
Copy link
Contributor

When using set shell to run scripts/tests that use was-sdkV3 clients e.g. @aws-sdk/client-dynamodb I run into this already documented error from the sdk package aws/aws-sdk-js-v3#2549

This appears to be being caused by the AWS_PROFILE value being passed through to the script from set shell. This has been validated to be the case with:

sst shell printenv

I assume that in SST V2 the AWS_PROFILE was not passed to the sub command of sst bind?

There is a user land work around as referenced in the thread above:

// https://github.com/aws/aws-sdk-js-v3/issues/2549
if (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_PROFILE) {
  delete process.env.AWS_PROFILE
}

This resolves the issue but feels less than ideal.

@jayair
Copy link
Contributor

jayair commented May 14, 2024

Ugh they don't seem to doing anything about it in that issue.

@alistairstead
Copy link
Contributor Author

Yeah, unlikely to get fixed in the SDK. I guess SST used to omit the profile value in the env?

@alistairstead
Copy link
Contributor Author

I've created a PR that should resolve this: #458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants