From 228bce5b82c8763a48cb169284a75e7f267cf959 Mon Sep 17 00:00:00 2001 From: david-perez Date: Fri, 31 Dec 2021 14:20:52 +0100 Subject: [PATCH] `README.md`: invoke lambda function with `raw-in-base64-out` In AWS CLI v2, you need to set `cli-binary-format` to `raw-in-base64-out` to send binary values as literals. You otherwise need to pass base64-encoded data. See https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-cli_binary_format.html. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d636b87..6c416544 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,9 @@ $ aws lambda create-function --function-name rustTest \ You can now test the function using the AWS CLI or the AWS Lambda console ```bash -$ aws lambda invoke --function-name rustTest \ +$ aws lambda invoke + --cli-binary-format raw-in-base64-out \ + --function-name rustTest \ --payload '{"command": "Say Hi!"}' \ output.json $ cat output.json # Prints: {"msg": "Command Say Hi! executed."}