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

Feat: Support All AWS Partitions #6412

Merged

Conversation

joel-aws
Copy link
Contributor

@joel-aws joel-aws commented Jun 15, 2023

This PR extends support of moto to all AWS Partitions.

One can see all Partitions, Regions, and DNS Suffixes with: curl https://raw.githubusercontent.com/boto/botocore/develop/botocore/data/endpoints.json | jq '.partitions[] | [.partitionName, .partition, .regions, .dnsSuffix]'

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @joel-aws, thanks for the PR! Please see my comment

moto/core/base_backend.py Outdated Show resolved Hide resolved
@joel-aws
Copy link
Contributor Author

I realized I was querying an old endpoints.json, so I just added the most recent DNS Suffixes.

@joel-aws joel-aws changed the title Feat: Support all Known AWS Partitions Feat: Support All AWS Partitions Jun 17, 2023
@codecov
Copy link

codecov bot commented Jun 17, 2023

Codecov Report

Merging #6412 (1dcf3e1) into master (932b7a2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #6412   +/-   ##
=======================================
  Coverage   96.16%   96.16%           
=======================================
  Files         799      799           
  Lines       77906    77917   +11     
=======================================
+ Hits        74920    74932   +12     
+ Misses       2986     2985    -1     
Flag Coverage Δ
servertests 36.93% <28.57%> (-0.01%) ⬇️
unittests 96.11% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
moto/core/base_backend.py 93.78% <100.00%> (+0.66%) ⬆️

... and 3 files with indirect coverage changes

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks again @joel-aws!

@bblommers bblommers added this to the 4.1.12 milestone Jun 18, 2023
@bblommers bblommers merged commit 4cbddbe into getmoto:master Jun 18, 2023
81 checks passed
@github-actions
Copy link
Contributor

This is now part of moto >= 4.1.12.dev36

@joel-aws joel-aws deleted the feat-support-all-regions-dns-suffixes branch June 19, 2023 14:06
@bblommers
Copy link
Collaborator

Hi @joel-aws!

Another followup question/issue around this feature:
The get_available_regions() will be potentially deprecated by the AWS SDK team - see aws/aws-sdk#206 (comment)

The suggested alternative way to get this region-information is to use the SSM parameter store instead, and I am looking into a feasible implementation for Moto.

The main problem I am running into is that these ISO regions are not exposed in the SSM parameter store. The US-gov and China regions are exposed, so it would make sense to me if the ISO-regions are also part of it.

Is that something you can raise internally, to see if that information can be included/exposed? I understand that it's probably an entirely different team responsible for this, but I'm assuming that a request from an internal employee would hold more weight than a random support ticket from a regular user 🙂

@joel-aws
Copy link
Contributor Author

@bblommers -- apologies for the delay in responding!

I am now posing this question internally... On the flip side, we value customer input via service tickets. If you haven't already opened one, could you do that and share the ticket # ?

@bblommers
Copy link
Collaborator

No problem @joel-aws - thanks for getting back to me.

I haven't been on top of this either, to be honest - I only just opened a ticket now, nr 171584385800169.

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.

None yet

2 participants