Reputation: 1
Created a lambda function to retrieve value from dynamodb.When I am testing the function I am getting an error in response?
Couldn't find any answer on the internet.
Upvotes: 0
Views: 169
Reputation: 187
Seems like in line 6 you have used
def handler(event,context):
instead of
def lambda_handler(event,context):
If you want to keep using def handler(event,context): you also need to enter this in 'Handler' option in 'Runtime Settings'
Upvotes: 0
Reputation: 19793
Your function should be named lambda_handler
def lambda_handler(event,context):
The documentation provides more information on this here: https://docs.aws.amazon.com/lambda/latest/dg/python-handler.html
Upvotes: 1