diff --git a/freqtrade/aws/strategy.py b/freqtrade/aws/strategy.py index 309865524..361b96f94 100644 --- a/freqtrade/aws/strategy.py +++ b/freqtrade/aws/strategy.py @@ -121,9 +121,8 @@ def code(event, context): if "Items" in response and len(response['Items']) > 0: if response['Items'][0]["public"]: - content = urlsafe_b64decode(response['Items'][0]['content']) - - return str(content) + content = urlsafe_b64decode(response['Items'][0]['content']).decode('utf-8') + return content else: return { "statusCode": 403, diff --git a/serverless.yml b/serverless.yml index d6ea7920d..c0bd7d1fb 100644 --- a/serverless.yml +++ b/serverless.yml @@ -126,6 +126,7 @@ functions: path: strategies/{user}/{name}/code method: get cors: true + integration: lambda request: parameter: paths: @@ -134,7 +135,8 @@ functions: response: headers: Content-Type: "'text/plain'" - + template: $input.path('$') + environment: strategyTable: ${self:custom.strategyTable}