Fixed issue with Lambda invoke via ARN

- Fixed an issue where Lambda invokes via an ARN was hitting real AWS.
This commit is contained in:
Mike Grima 2020-02-04 17:06:55 -08:00
commit bb64258a8f
3 changed files with 40 additions and 1 deletions

View file

@ -176,7 +176,8 @@ class LambdaResponse(BaseResponse):
def _invoke(self, request, full_url):
response_headers = {}
function_name = self.path.rsplit("/", 2)[-2]
# URL Decode in case it's a ARN:
function_name = unquote(self.path.rsplit("/", 2)[-2])
qualifier = self._get_param("qualifier")
response_header, payload = self.lambda_backend.invoke(