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

Default region is more harmful than helpful #1013

Open
cdegroot opened this issue Nov 8, 2023 · 0 comments
Open

Default region is more harmful than helpful #1013

cdegroot opened this issue Nov 8, 2023 · 0 comments

Comments

@cdegroot
Copy link

cdegroot commented Nov 8, 2023

I just lost a couple of hours debugging an issue with a new environment where our Elixir code crashed with a permission error but the equivalent AWS CLI command on a shell ran just fine. This was an EC2 box in us-east-2 using an instance role.

It took me a while to realize that ExAWS has a default region when nothing is set, us-east-1. That explained why a different account (in us-east-1) ran the code just fine.

Consider removing that default, please. I think it's not the first time that a colleague or I got tricked by it, although today was one of the times that it took quite a while to realize that this was at hand. "us-east-1" is not a special region (anymore), and it is much more helpful to just crash when developers forget to explicitly configure a region either VM-wide or for a request. If we must have a default region, then probably the equivalent of {:system, "AWS_REGION"} is better than a hardcoded region.

(I am filing this as an issue to see whether people agree; I am, of course, more than happy to follow up with a PR if maintainers respond positively).

@cdegroot cdegroot changed the title Default region is more harmful than helpfuil Default region is more harmful than helpful Nov 8, 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