AWS Cli Command to create elasticsearch domain gives error

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

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

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