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

sample-apps/blank-go - 0-run-tests.sh failure with aws cli v2 + sso #303

Open
msbenz opened this issue Aug 27, 2021 · 0 comments
Open

sample-apps/blank-go - 0-run-tests.sh failure with aws cli v2 + sso #303

msbenz opened this issue Aug 27, 2021 · 0 comments

Comments

@msbenz
Copy link

msbenz commented Aug 27, 2021

Not a big bug by any means, and it's easy to fix my local environment. However, a new user to AWS may find the bellow error (resulting from properly following the walkthrough) to be confusing and prevent use of the sample app. Documentation does not note an auth limitation for v2 sso.

Environment:

  • WSL (Ubuntu 20.04.2 LTS)
  • go version go1.11.13 linux/amd64
  • aws-cli/2.0.30 Python/3.7.3 Linux/4.4.0-19041-Microsoft botocore/2.0.0dev34
  • Auth profile created via cli aws configure sso

Error
Attempting to run through the deployment of the blank-go sample, I receive the following error:

...
--- FAIL: TestMain (0.35s)
main_test.go:32: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
main_test.go:34: ERROR
main_test.go:36: Output does not contain FunctionCount.
FAIL
exit status 1
FAIL github.com/awsdocs/aws-lambda-developer-guide/sample-apps/blank-go 0.379s`

Reproduction

  1. Clear locally stored profiles/credentials
  2. Create a profile with a v2 credential via aws configure sso
  3. Export cached profile as default
  4. Run ../sample-apps/blank-go/0-run-tests.sh

Resolution
Adding profile values (key_id/secret/token) to .../.aws/credentials file allows script to pass successfully.
Use of yawsso simplifies this process

@mwunderl mwunderl changed the title blank-go/0-run-tests.sh failure when using aws cli v2 with sso sample-apps/blank-go - 0-run-tests.sh failure with aws cli v2 + sso Oct 31, 2023
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

1 participant