How to pass parameters to serverless invoke local

前端 未结 6 1864
北荒
北荒 2020-12-29 18:59

I\'m working on a aws serverless project and need to test the lambda functions locally.
I am using serverless invoke local -f {function_name} command to te

6条回答
  •  悲哀的现实
    2020-12-29 19:23

    For future reference. Your case would have been solved like this. Just figured it out thanks to Kannaiyans JSON Example.

    sls invoke local -f getFoodDetails --data '{ "queryStringParameters": {"food_id":"123"}}'
    

提交回复
热议问题