# AWS Cli Command to create elasticsearch domain gives error

**URL:** https://discuss.elastic.co/t/aws-cli-command-to-create-elasticsearch-domain-gives-error/137639
**Category:** Elasticsearch
**Created:** [June 27, 2018, 2:05pm UTC](https://discuss.elastic.co/t/aws-cli-command-to-create-elasticsearch-domain-gives-error/137639 "2018-06-27T14:05:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Shweta\_Priyadarshani](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@Shweta\_Priyadarshani](https://discuss.elastic.co/u/Shweta_Priyadarshani)
#### Post date: [June 27, 2018, 2:05pm UTC](https://discuss.elastic.co/t/aws-cli-command-to-create-elasticsearch-domain-gives-error/137639/1 "2018-06-27T14:05:26Z")

</div>

I am trying to create elasticsearch domain using AWS Cli using command :

aws es create-elasticsearch-domain --domain-name weblogs --elasticsearch-version 5.5 --elasticsearch-cluster-config InstanceType=m4.large.elasticsearch,InstanceCount=2 --ebs-options EBSEnabled=true,VolumeType=standard,VolumeSize=100 --access-policies '{"Version": "2012-10-17", "Statement": [{"Action": "es:", "Principal":"","Effect": "Allow", "Condition": {"IpAddress":{"aws:SourceIp":["192.0.2.0/32"]}}}]}'

which is provided on aws documentation. But when i am running above command its giving me following error:

usage: aws [options] [...] [parameters] To see help text, you can run: aws help aws help aws help Unknown options: Statement:, [, {, Effect:, Allow,, Principal:, {AWS:, arn:aws:iam::555555555555:root, },, Action:es:,, Resource:, arn:aws:es:us-east-1:555555555555:domain/logs/, },], }', 2012-10-17,

Is anyone having any idea on whats the issue and how to resolve this

Thanks in advance

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [June 27, 2018, 10:43pm UTC](https://discuss.elastic.co/t/aws-cli-command-to-create-elasticsearch-domain-gives-error/137639/2 "2018-06-27T22:43:21Z")

</div>

I think you would need to ask AWS support about this.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 25, 2018, 10:43pm UTC](https://discuss.elastic.co/t/aws-cli-command-to-create-elasticsearch-domain-gives-error/137639/3 "2018-07-25T22:43:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
