-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Real API Gateway endpoints unreachable when moto submodules #4597
Comments
Hi @getglad, that is on purpose, actually - we intercept all requests to AWS to prevent people from accidentally changing their real infrastructure. One option would be to at least make this behaviour configurable via an environment variable. The majority would want to intercept everything, as a fail-safe, but for expert users the option should be there to connect to AWS itself. If you'd like to contribute, a PR is always welcome! For this specific feature, the logic that intercepts all AWS calls currently resides here: https://github.com/spulec/moto/blob/master/moto/core/models.py#L485:L500 I haven't tested it out yet - but it might be as simple as placing an if-statement around that block, Let me know if that makes sense - happy to help out if you get stuck! |
Hi @getglad, it's been a while, but this feature is now part of the latest alpha-release: The new
See the release announcement here: #7198 Are you able to upgrade and verify that this works for you? |
Moto V5 has now been released, so I'll close this. Release: https://pypi.org/project/moto/5.0.0/ Documentation about this feature: http://docs.getmoto.org/en/5.0.0/docs/configuration/index.html |
Moto Version: 2.2.15
Boto3 Version: 1.20.7
I have a test that mocks
ssm
, but attempts to reach a realexcute-api
API Gateway endpoint. It appears that theresponses_mock
may be catching it? Despite not loading an API Gateway mock, I am getting a "The method is not implemented" message.https://github.com/spulec/moto/blob/a912fc4cac1d4e66401e1772fe3c7a4182c2040e/moto/core/models.py#L450
https://github.com/spulec/moto/blob/master/moto/core/models.py#L485-L500
An example test
If I put a
breakpoint()
inmoto/core/models.py(322)_find_first_match()
, the request below catches in that function for reasons that do not make sense to me. I would not expectmoto
to even be involved at this point, but I have to imagine the fact that it is aexecute-api.<region>.amazonaws.com
url is contributing to the issue.https://github.com/spulec/moto/blob/master/moto/core/models.py#L315-L319
I'm happy to try to contribute a fix, but not sure where to start.
The text was updated successfully, but these errors were encountered: