Closed sunmingtao closed 4 years ago
Getting rid of --cli-binary-format raw-in-base64-out
works
aws lambda invoke --function-name smt-lambda-function --payload '{"key1": "value1", "key2": "value2", "key3": "value3" }' --region ap-southeast-2 response.json
Turns out --cli-binary-format
is only supported in CLI version 2
To uninstall AWS-CLI version 1:
pip3 uninstall awscli -y
Then install aws-cli version 2
Download from https://awscli.amazonaws.com/AWSCLIV2.pkg and double click to install
Open a new terminal window
aws --version
To invoke the lambda function asynchronously ,
aws lambda invoke --function-name smt-lambda-function --cli-binary-format raw-in-base64-out --payload '{"key1": "value1", "key2": "value2", "key3": "value3" }' --invocation-type Event --region ap-southeast-2 response.json
Run
aws lambda list-functions --region ap-southeast-2
Display
Run
aws lambda invoke --function-name smt-lambda-function --cli-binary-format raw-in-base64-out --payload '{"key1": "value1", "key2": "value2", "key3": "value3" }' --region ap-southeast-2 response.json
Get error