diff --git a/moto/s3/urls.py b/moto/s3/urls.py index af0a9954e..1d439a549 100644 --- a/moto/s3/urls.py +++ b/moto/s3/urls.py @@ -21,7 +21,7 @@ url_paths = { '{0}/$': S3ResponseInstance.bucket_response, # subdomain key of path-based bucket - '{0}/(?P[^/?]+)/?$': S3ResponseInstance.ambiguous_response, + '{0}/(?P[^/]+)/?$': S3ResponseInstance.ambiguous_response, # path-based bucket + key - '{0}/(?P[^/?]+)/(?P.+)': S3ResponseInstance.key_response, + '{0}/(?P[^/]+)/(?P.+)': S3ResponseInstance.key_response, }