#3494 fix using EventBridge via Go SDK (#3495)

This commit is contained in:
Christian Bandowski 2020-11-26 09:52:58 +01:00 committed by GitHub
parent 9e3b23758a
commit f58e6e1038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,11 @@ class DomainDispatcherApplication(object):
# S3 is the last resort when the target is also unknown
service, region = DEFAULT_SERVICE_REGION
if service == "EventBridge":
# Go SDK uses 'EventBridge' in the SigV4 request instead of 'events'
# see https://github.com/spulec/moto/issues/3494
service = "events"
if service == "dynamodb":
if environ["HTTP_X_AMZ_TARGET"].startswith("DynamoDBStreams"):
host = "dynamodbstreams"