Serverless framework: passing query parameters to ‘serverless invoke’

If you’re using ‘serverless invoke’ to call deployed Lambdas, you can pass params to the Lambda with the –data option :

--data '{ "queryStringParameters": {"paramname":"value"}}'

This is the equivalent of a GET request to /api-gw-endpoint-url/stagename/resourcename?paramname=value

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.