-
Notifications
You must be signed in to change notification settings - Fork 8
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
Improve error message when a region is incorrect #439
Comments
@jnioche please just let me know if you intend to propose a PR for this, (otherwise I will put it on my todo list). |
my RUST skills are very limited, I'm afraid. |
No worries with Rust ;-) I much appreciate you reported the issue in the first place. Until we have a proper fix, I will mention it in the documentation #442 . |
Had a quick look, there is no way of validating a region in the AWS SDK. There is a JSON file in this repo listing all the regions; it would need to be imported as a resource. |
Actually, since I had specified an AWS profile with
shouldn't the region specified there override the default value? Setting |
Thanks to your feedback, I simplified the code related to how cloud-scanners picks up the region. See this PR #447. Now, the logic is:
Furthermore I added a check (and hoppefully a more explicit error message) after this step so that we should be warned if the region is not supported by cloud scanner (like if AWS opens a new region or if in case of a typo in the region name). |
Thanks @demeringo, just tested your change, it works fine |
Problem
The problem is simply that
eu-east-1
is a typo.us-east-1
was the correct value.The error message could be more explicit and tell the user that there is no such region.
Solution
An internal lookup of the allowed values and a message indicating that the value does not exist.
The text was updated successfully, but these errors were encountered: