I'm trying to invoke a lambda function from my AWS CLI in windows 10. I've done previously a configuration of my client thru AWS configure.
The command used is:
aws lambda invoke \
--function-name arn:aws:lambda:us-east-1:111111111:function:xxx \
--invocation-type RequestResponse
but my system is returning an error aws: error: too few arguments
, as shown below:
Could you guys guide me to succeed in this execution?
thanks
In addition to @jarmod's answer:
You can use -
if want to send output directly to stdout:
aws lambda invoke --function-name my_function --invocation-type RequestResponse --log-type Tail - | grep "LogResult"| awk -F'"' '{print $4}' | base64 --decode
or if you have jq
aws lambda invoke --function-name my_function --invocation-type RequestResponse --log-type Tail - | jq '.LogResult' -r | base64 --decode
It looks like you need to provide an outfile. So re-run it as follows:
aws lambda invoke \
--function-name arn:aws:lambda:us-east-1:111111111:function:xxx \
--invocation-type RequestResponse \
outfile.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With