Escaping of string parameter different for dotnet lambda-test-tool-6.0...
and dotnet lambda invoke-function...
#1135
Labels
dotnet lambda-test-tool-6.0...
and dotnet lambda invoke-function...
#1135
Description
Invoking a Lambda function that takes a string as a parameter from the
lambda-test-tool
requires different escaping than invoking the real Lambda fromdotnet lambda invoke-function
.Reproduction Steps
Create a new Lambda from the template
lambda.EmptyFunction
.Deploy to AWS Lambda.
Command Prompt
Run
dotnet lambda invoke-function EmptyFunction --payload ""hello""
, ordotnet lambda invoke-function EmptyFunction --payload '"hello"'
.These will work.
Try
dotnet lambda-test-tool-6.0 --no-ui --payload ""hello""
, ordotnet lambda-test-tool-6.0 --no-ui --payload '"hello"'
These will fail - "System.Exception: Error deserializing the input JSON to type String"
PowerShell
Run
dotnet lambda invoke-function EmptyFunction --payload ""hello""
, ordotnet lambda invoke-function EmptyFunction --payload '"hello"'
These will work.
Try
dotnet lambda-test-tool-6.0 --no-ui --payload ""hello""
, ordotnet lambda-test-tool-6.0 --no-ui --payload '"hello"'
These will fail - "System.Exception: Error deserializing the input JSON to type String"
What actually works for lambda-test-tool-6.0
PowerShell -
dotnet lambda-test-tool-6.0 --no-ui --payload '\"hello\"''
Command Prompt -
dotnet lambda-test-tool-6.0 --no-ui --payload "\"hello\""
Logs
Environment
dotnet
This is a 🐛 bug-report
The text was updated successfully, but these errors were encountered: