Search code examples
amazon-web-serviceshiveemraws-cliamazon-emr

Passing hive configuration with aws emr cli


I am following doc: http://docs.aws.amazon.com/ElasticMapReduce/latest/ReleaseGuide/emr-dev-create-metastore-outside.html and trying to create emr cluster using the awscli==1.10.38 .

I use the following command as mentioned in the documentation:

aws emr create-cluster --release-label emr-5.0.0 --instance-type m3.xlarge --instance-count 2 \
--applications Name=Hive --configurations ./hiveConfiguration.json --use-default-roles

I am also using the exact same hiveConfiguration.json as mentioned in the document.

but it says "aws: error: invalid json argument for option --configurations"

Why do I get the error?


Solution

  • Your argument to --configurations is incorrect. Missing file:// CLI needs to know you are specifying a file or S3 object.

    aws emr create-cluster --configurations file://hiveConfiguration.json