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. https://github.com/awsdocs/aws-lambda-developer-guide/blob/ed29db606a6a8a42c6fef5ffaa01db59cd4837c0/sample-apps/blank-java/4-invoke.sh#L6 One fix is to add the argument **--cli-binary-format raw-in-base64-out** which reverts the call back to CLI v1 behavior.