1 Answer
- Newest
- Most votes
- Most comments
0
I'd recommend to print out the event object and understand whether the 'q' field is present or not.
For instance:
print('event:', json.dumps(event))
print('queryStringParameters:', json.dumps(event['queryStringParameters']))
Then you can verify whether some checks need to be done or defaulting to an empty string.
Relevant content
- Accepted Answerasked 10 months ago
- Accepted Answerasked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- How can I resolve the "ERROR: ˂module/extension˃ must be loaded via shared_preload_libraries" error?AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 months ago
Thanks for the answer, do i add the prints in my lambda handler? If i do this, i get no prints in my terminal?
just add print("xxx") in your handler and deploy. You can refer to your other question here as well: https://repost.aws/questions/QUfvLELnaIR9GEShYjEvtOZg/lambda-function-error-list-indices-must-be-integers-or-slices-not-str