Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError at line 18, Changed 'Content-Type' to 'content-type' #3

Closed
akash2099 opened this issue Nov 17, 2020 · 1 comment
Closed

KeyError at line 18, Changed 'Content-Type' to 'content-type' #3

akash2099 opened this issue Nov 17, 2020 · 1 comment

Comments

@akash2099
Copy link

CloudWatchLog is showing KeyError, as follows:

[ERROR] KeyError: 'Content-Type'Traceback (most recent call last):  File "/var/task/lambda_function.py", line 13, in lambda_handler    content_type = event["headers"]['Content-Type']

After print(event) , I noticed that it should be 'content-type' not 'Content-Type'.

Great tutorial on API Gateway on Youtube. Love it.

@srcecde
Copy link
Owner

srcecde commented Jan 30, 2021

This is resolved.

@srcecde srcecde closed this as completed Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants