Invalid API Gateway Response Keys: set([u'multiValueHeaders']) in with `sam local start-api`
See original GitHub issueDescription
I am trying to test my local function with sam local start-api
but it appears to make an useless validation to the response.
Observed result
Invalid API Gateway Response Keys: set([u'multiValueHeaders']) in {u'body': u'{"Status":true,"Message":"OTP Generated"}', u'headers': {u'Content-Type': u'application/json'}, u'multiValueHeaders': {}, u'statusCode': 200}
Function returned an invalid response (must include one of: body, headers or statusCode in the response object). Response received: {"statusCode":200,"headers":{"Content-Type":"application/json"},"multiValueHeaders":{},"body":"{\"Status\":true,\"Message\":\"OTP Generated\"}"}
Expected result
Describe what you expected.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Ubuntu 16.04
sam --version
: SAM CLI, version 0.16.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
sam local start-api go lambda returns 502 "internal server ...
The error message clearly states: Invalid API Gateway Response Keys. I faced a similar error in which I received error for the response...
Read more >Running API Gateway locally - AWS Documentation
Start a local instance of API Gateway using the sam local start-api AWS SAM CLI command.
Read more >AWS SAM Configuration for API Gateway Binary Response ...
In this walkthrough, I will use application/zip for example. 1. CloudFormation yaml. To enable Api Gateway Binary Response, you can set x-amazon-apigateway- ...
Read more >How To Test your AWS Lambda Locally with SAM - YouTube
AWS Lambda functions are extremely powerful FaaS components. In this video, I teach you how to use Serverless Application Model ( SAM )...
Read more >How to quickly build an API with Lambda, API Gateway, and ...
Learn how to build an API using AWS Lambda, API Gateway, and the AWS Serverless Application Model (SAM) from start to finish.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
on
aws-cli/1.17.13 Python/2.7.17 Linux/4.19.0-10-amd64 botocore/1.14.13
I have this error when running locally, deploying using the guided switch also fails with internal server error when invoked
@thomasdane if you look at your output closely, you will see that /var/task/main does not exist. This is most likely due to docker shared setting not being configured to allow the directory. If your on windows and already have the drive shared correctly, toggling the setting is the best way to get docker to remember it can share. Your error does not relate to this issue.