amazon-web-servicesamazon-ec2aws-cliamazon-emr

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


I'm trying to create a cluster from inside one of my EC2 instances. Typing the following command to start my cluster:

aws emr create-cluster --release-label emr-5.20.0 --instance-groups instance-groups.json --auto-terminate and so on...

I receive the following error:

Error parsing parameter '--instance-groups': Expected: '=', received: 'EOF' for input:
instance-groups.json
                    ^

I already tried --instance-groups=instance-groups.json, but I get the same error message.

What's wrong here?


Solution

  • The reason this was failing was because AWS has strict rules when it comes to providing the path for reading files within your EC2 instance.

    So, if you want to read the file instance-groups.json (assuming it is in the same directory from where you're running the aws emr CLI command), you must provide file://instance-groups.json as the filename, instead of the straightforward instance-groups.json.