I'm making a call to the AWS Lambda CLI to invoke my function. I want to get the function response (Payload) as part of my return object so I'm passing --invocation-type RequestResponse
. With that, I'm still only getting the function output in my output file (which I actually don't care about). I want it as part of the object returned from this CLI call but there I only get the LogResult and the StatusCode.
{
"LogResult": "encoded blah blah blah",
"StatusCode": 200
}
Am I making a typo in my command or am I missing something? How can I get the function output (Payload) as part of the object returned from this CLI call?
aws lambda invoke --function-name myFunction --invocation-type RequestResponse --log-type Tail --payload {} --region us-east-1 testoutput.txt