fuseless-template icon indicating copy to clipboard operation
fuseless-template copied to clipboard

Invalid API Gateway Response Keys: {'base64Encoded'}

Open randy-johnson opened this issue 5 years ago • 2 comments

Hello,

When I fire this demo up and use the sam local start-api and go to the dump page I see the output in the console but it seems to error and the output doesn't make it to the screen. The error is at the start of the content below. Any idea what is going on?

I confirmed it was the correct cfdump code by putting in a test.html file and reviewing the content in the browser.

Invalid API Gateway Response Keys: {'base64Encoded'} in {'statusCode': 200, 'headers': {'Content-Length': '8489', 'Content-Type': 'text/html; charset=UTF-8'}, 'body': '\n<!-- ==start== dump {ts \'2020-04-15 18:17:57\'} fo
rmat: html -->\n<div id="x1" class="-lucee-dump"><style>\n.-lucee-dump .disp-none { display: none; }

randy-johnson avatar Apr 15 '20 18:04 randy-johnson

Hi @randy-johnson,

The sam command requires that you have some AWS credentials, even though it doesn't really need them for sam local

You can create some dummy values in environment variables, such as:

AWS_ACCESS_KEY_ID=EMPTY
AWS_SECRET_ACCESS_KEY=EMPTY
AWS_DEFAULT_REGION=us-east-1

That might do the trick. Let me know if not.

pfreitag avatar Apr 15 '20 18:04 pfreitag

Hi @pfreitag, That did not seem to help.

A coworker was running into the same issues on windows, he downgraded to https://github.com/awslabs/aws-sam-cli/releases/tag/v0.15.0

and it started working for him.

I found this issue https://github.com/awslabs/aws-sam-cli/issues/1193 which mentions my same error but wasn't sure if it applies here or not.

randy-johnson avatar Apr 15 '20 20:04 randy-johnson