-
-
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
Wrong selection of backend when running moto server on EC2 #2539
Comments
If one is running multiple backends at the same time, we need some way to know which service the user is requesting. The host header seemed like the best option available, but I'm open to alternatives. |
I think we should switch to the authorization header |
We also look at the authorization header where possible: https://github.com/spulec/moto/blob/master/moto/server.py#L61-L102 There may be more there we can do to extend that. I would be okay adding logic to the server to also check for another custom header. Ideally, we would follow a similar pattern as the Host header so it could be as simple a change as
->
|
It's been a while, but this should now work as of Moto v5 - Moto no longer relies on the HTTP_HOST header. Please see the release accouncement (with all breaking changes) here: #7198 |
I'm running moto on an EC2 VM. I got another system running also as an EC2 VM which calls moto. when trying to create a new stack (CloudFormation) i'm getting a NotImplemented Error.
After plenty of debugging - i found that moto actually infers the backend from the host name.
Reference: moto/server.py line: 121
Is there a reason for this? I'm not really sure this is true to the normal behavior of AWS
Suggestion: completely remove this check. i'd be happy to do create a PR if that's agreed.
The text was updated successfully, but these errors were encountered: