user212942
user212942

Reputation: 317

querystring not getting in AWS Lambda integration proxy

API Gateway

Lambda event

With this setting, the variable is set to null no matter what querystring you enter in the URL.

Upvotes: 0

Views: 637

Answers (2)

user212942
user212942

Reputation: 317

My problem caused by CloudFront caching setting. I had solved to below setting in CloudFront. Query String Forwarding and Caching: Forward All

Upvotes: 3

Assael Azran
Assael Azran

Reputation: 2993

Here is two possible solutions

Api call: /api/v1/member?q=1234.

Lambda function : event.queryStringParameters.q

Api call: /api/v1/member/1234.

Lambda function: event.pathParameters['proxy+']

Upvotes: -1

Related Questions