Home » Solve “Error parsing parameter … : Expected: ‘=’, received: ‘EOF’ for input:” in AWS CLI

Solve “Error parsing parameter … : Expected: ‘=’, received: ‘EOF’ for input:” in AWS CLI

  • by
  • 1 min read
Tags:

The following error might occur when you would like to pass the contents of a file to an AWS CLI command.

Error parsing parameter 'YOUR_PARAMETER': Expected: '=', received: 'EOF' for input:

Amazon web services has very strict rules regarding referring to file contents. When you refer to the content of a file you need to use the file:// protocol. The following example writes the contents of a JSON file to a DynamoDB database.

aws dynamodb batch-write-item --request-items file://your-file.json

By the way, it matters how your file is encoded. For binary files, you can use the fileb:// protocol.

  • file:// – The AWS CLI treats the file content as base64-encoded text. For example: –some-param
    file://~/my/path/file-with-base64.txt
  • fileb:// – The AWS CLI treats the file content as unencoded binary. For example: –some-param
    fileb://~/my/path/file-with-raw-binary.bin

Say thanks, ask questions or give feedback

Technologies get updated, syntax changes and honestly… I make mistakes too. If something is incorrect, incomplete or doesn’t work, let me know in the comments below and help thousands of visitors.

Leave a Reply

Your email address will not be published. Required fields are marked *