-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sample-apps - CLI v2 Invalid base64 error on lambda invoke #180
Comments
Hi Stephen, Thanks for your feedback. Unfortunately, adding that argument is messy and breaks the command for the v1 CLI. I wonder if there's a way to avoid using
Thanks, |
I ran into this same issue today. I understand the need to keep it backward compatible, would it atleast help by adding a note in the Readme doc somewhere? I am aware that the requirements section clearly mention to use AWS CLI v1 but I would imagine most people might be already having aws cli v2 installed and may not even notice this issue until after experiencing it. |
I think we can make this work by changing Thanks, |
Thanks for looking into this Michael. Using I did notice that using |
Sorry that was a typo, I meant to say |
Is there a fix coming? Still getting the invalid base64 error for Python. This repo is linked to from the official AWS documentation, would be nice if it worked. |
I fixed by converting to base64 PAYLOAD=$(cat ./events/xxxxxxxx.json | base64) |
The cli-binary-format option is required if you are using AWS CLI version.
|
Updated the invoke scripts to use |
The AWS CLI v2 has a breaking change in which it treats a file:// CLI option as base64-encoded text.
https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration.html#cliv2-migration-binaryparam
This breaks the 4-invoke.sh script lambda invoke call.
aws-lambda-developer-guide/sample-apps/blank-java/4-invoke.sh
Line 6 in ed29db6
One fix is to add the argument --cli-binary-format raw-in-base64-out which reverts the call back to CLI v1 behavior.
The text was updated successfully, but these errors were encountered: