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

Improving AWS partition detection #801

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Nitrino
Copy link

@Nitrino Nitrino commented Jul 13, 2021

I am trying to use ex_aws with Oracle Objects Storage and I receive an error s3 not supported in region us-sanjose-1 for partition aws. This happens due to the same region formats for AWS and Oracle.

Example:
us-sanjose-1 matches the given regular expression

{~r/^(us|eu|af|ap|sa|ca)\-\w+\-\d+$/, "aws"},

This PR improves AWS region detection logic by clarifying the second part of the region name.

I also added support for the me zone for me-south-1 Middle East (Bahrain) region

@Nitrino Nitrino changed the title Improving AWS region detection Improving AWS partition detection Jul 14, 2021
@bernardd
Copy link
Contributor

Hi Nitrino - thanks for the PR! Just to help me understand, what's the issue with using OOS? Is there some module to support it that plugs into ex_aws or something? Might this still be a problem if OOS ended up using a region name which matched one of AWS's?

@Nitrino
Copy link
Author

Nitrino commented Jul 17, 2021

Hi @bernardd
I use ex_aws without third-party modules. It works great, as OOS API has compatibility with AWS S3.

Yes, in the future there may be a problem if Oracle adds the same name of the region as the AWS. In this case, it will be better to keep the accurate list of AWS regions or add setting the control of this logic.
But while I checked the full list of Oracle regions and there is no overlap with AWS, so I decided to just clarify the regular expression that would not make big changes to the library

Full list Oracle regions: https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm

@bernardd
Copy link
Contributor

Hey - sorry for not getting back to you sooner. Thinking about this, I wonder if a better approach might not be some config parameter that allows us to skip the check entirely. Something like default_endpoint_config: false (defaulting to true). That would allow any compatible system, even ones with identical region names, to work without issue. Does that sound like a reasonable plan?

@Nitrino
Copy link
Author

Nitrino commented Jul 29, 2021

Hey @bernardd At the moment, I do not know of compatible systems with same regions, but I think the config will still be a more correct solution.
Let me change the PR for the config?

dependabot bot and others added 3 commits December 22, 2021 14:10
Bumps [jason](https://github.com/michalmuskala/jason) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/michalmuskala/jason/releases)
- [Changelog](https://github.com/michalmuskala/jason/blob/master/CHANGELOG.md)
- [Commits](michalmuskala/jason@v1.2.2...v1.3.0)

---
updated-dependencies:
- dependency-name: jason
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants