From 1fb06e6a085d52e7e237a0b3d8f833739a016cfe Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Sun, 21 Jul 2019 23:03:36 -0500 Subject: [PATCH] Cleanup refactor. --- moto/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moto/server.py b/moto/server.py index 907681f09..89be47093 100644 --- a/moto/server.py +++ b/moto/server.py @@ -80,8 +80,9 @@ class DomainDispatcherApplication(object): if target: service, _ = target.split('.', 1) service, region = UNSIGNED_REQUESTS.get(service, DEFAULT_SERVICE_REGION) - # S3 is the last resort when the target is also unknown - service, region = DEFAULT_SERVICE_REGION + else: + # S3 is the last resort when the target is also unknown + service, region = DEFAULT_SERVICE_REGION if service == 'dynamodb': if environ['HTTP_X_AMZ_TARGET'].startswith('DynamoDBStreams'):