-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Error message not good enough in case only region is not defined #131
Comments
Alright the typo is an easy fix. As per the error message, I see the problem... I'm afraid this gets into rather verbose messaging though, what I'm inclined to use now is:
It feels both verbose and barely actionable, which makes me unhappy. I'd appreciate any suggestion for a better wording. I was for one thing thinking about pointing the user to the documentation page of the AWS SDK/CLI on how to configure credentials/region, too. |
No environment can be inferred if we are unable to determine any of: 1. The account ID (no AWS credentials can be obtained via standard ways) 2. The region to be used The error message covered 1 but not 2. New message covers both and corrects a typo, but still is not as actionale as we'd like it to be. See #131
I have no problem with verbosity in error messages. If it will help users identify what went wrong and how to fix it, it should be in the message. |
Point them to the "Getting Started" topic. It has a link to the CLI command and reinforces them to read the d@mn docs! |
👋 I'm taking my first baby steps beta testing the CDK today and I'm a bit stuck here. When running I have the following AWS credentials and configurations in environment variables:
My organization sticks to environment variables, and uses temporary credentials at all times -- the awscli |
Hey @rclark - according to the AWS SDK for JS documentation, |
Did we remove support for I feel that since this is what the AWS CLI expects, and people will have written tooling to generate those environment variables, we should support that. |
I guess it was dropped when we adopted "pure SDK" behavior. We can re-introduce, obviously, however I would rather get the JS SDK fixed so it behaves like the other SDKs... |
I found aws/aws-sdk-js#373 on this particular topic. It would appear the CLI (and boto) are outliers compared to the other SDKs. What I propose is to amend our own code so that:
Then continue using the JS SDK for determining region, account, .... |
We need to document:
|
Yes, this worked. Thanks! |
I think we should align our behavior to the CLI, with all it's beautiful outlying quirks because the toolkit is a command-line-tool and user expectation would be for it to behave similarly to the CLI |
@RomainMuller I think your proposal makes sense. |
The AWS CLI considers `AWS_DEFAULT_PROFILE` and `AWS_DEFAULT_REGION` when creating default clients, however the AWS SDK for JS only considers `AWS_PROFILE` and `AWS_REGION`. This aims to align the behavior of both ways by automatically setting `AWS_PROFILE` and `AWS_REGION` from the matching `AWS_DEFAULT_` variable (unless the variables were already set) See #131
Submitted #175 to implement that suggestion. |
#175 resolves this |
Repro:
~/.aws/config
,~/.aws/credentials
and any environment variables.aws configure
, supply access key and secret, but leave "region" toNone
.Then, try to run
cdk delpoy
. The error message is:Also, there's a typo "credentails" 😉
The text was updated successfully, but these errors were encountered: