1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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.
Contenido relevante
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año
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