Pass query params as event

Hello guys,

I am stucking with POST requests currently because I do not know how to work with GET query params and pass them to my sls function.

For instance, I want to use /customers/searchByCustomerId?customerId={customerId}

Does somebode have a hint for me or example how to do that?

Thank you an best,

Marcel

Query parameters are available in the default request template if you’re using a recent version of Serverless.

You should just be able to get them from event.query.customerId in your example.

1 Like