Monday, May 22, 2023
HomeSoftware Engineering Unknown choices: –cli-binary-format AWS CLI

[Solved] Unknown choices: –cli-binary-format AWS CLI

In case you have tried calling the AWS CLI and received the next error:

Unknown choices: --cli-binary-format

Then it’s since you are utilizing the AWS CLI v1 and ought to be utilizing the newer AWS CLI v2.

One other error that you will note together with that is:

An error occurred (InvalidRequestContentException) when calling the Invoke operation: Couldn't parse request physique into json: Couldn't parse payload into json: Unrecognized token 'eyJwYXRoIjoiJEdMAAAAIgfQo': was anticipating (JSON String, Quantity, Array, Object or token 'null', 'true' or 'false')

An instance that fails on AWS CLI v1

aws lambda invoke --function-name YourFunction --cli-binary-format raw-in-base64-out --payload '{"yourKey":"yourValue"}'

How one can repair this error on AWS CLI v1

aws lambda invoke --function-name YourFunction --region eu-west-1 --payload '{"yourKey":"yourValue"}' response.json

How one can repair this error by Upgrading to AWS CLI v2

You may observe the information on to improve your CLI from v1 to v2 right here Migrating from AWS CLI model 1 to model 2 – AWS Command Line Interface (

The directions run by means of platform particular upgrades migrations:
AWS CLI model 2 migration directions – AWS Command Line Interface (

How one can examine your AWS CLI model

You may examine the model your aws CLI is working by typing:

aws --version


Please enter your comment!
Please enter your name here

Most Popular

Recent Comments