ex-aws / ex_aws

A flexible, easy to use set of clients AWS APIs for Elixir
https://hex.pm/packages/ex_aws
MIT License
1.26k stars 521 forks source link

Adjust AWS partition detection regex #880

Open liamwhite opened 2 years ago

liamwhite commented 2 years ago

There aren't any known AWS regions that have more than a single digit in the number (as far as I know). This regex fixes compatibility with Backblaze B2's region names, which are of the form us-west-000.

bernardd commented 2 years ago

I've been thinking about this and I'm not sure I really like the idea of identifying Backblaze (or other providers) regions as AWS when they're really not. I think the right solution here would be list Backblaze as a separate partition in priv/endpoints, and have 3-digit region names point to it instead (ie, add another entry to the @partitions attribute). In the future this may result in us having overlapping regex partition identifiers, in which case we'll need to think about adding an optional provider config setting to allow it to choose, but for now, if all Backblaze partitions have 3 digits that should be enough.