HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //lib/python3/dist-packages/awscli/examples/es/create-elasticsearch-domain.rst
The following ``create-elasticsearch-domain`` command creates a new Amazon Elasticsearch Service domain within a VPC and restricts access to a single user. Amazon ES infers the VPC ID from the specified subnet and security group IDs::

   aws es create-elasticsearch-domain --domain-name vpc-cli-example --elasticsearch-version 6.2 --elasticsearch-cluster-config InstanceType=m4.large.elasticsearch,InstanceCount=1 --ebs-options EBSEnabled=true,VolumeType=standard,VolumeSize=10 --access-policies '{"Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::123456789012:root" }, "Action":"es:*", "Resource": "arn:aws:es:us-west-1:123456789012:domain/vpc-cli-example/*" } ] }' --vpc-options SubnetIds=subnet-1a2a3a4a,SecurityGroupIds=sg-2a3a4a5a

Output::

   {
       "DomainStatus": {
           "ElasticsearchClusterConfig": {
               "DedicatedMasterEnabled": false,
               "InstanceCount": 1,
               "ZoneAwarenessEnabled": false,
               "InstanceType": "m4.large.elasticsearch"
           },
           "DomainId": "123456789012/vpc-cli-example",
           "CognitoOptions": {
               "Enabled": false
           },
           "VPCOptions": {
               "SubnetIds": [
                   "subnet-1a2a3a4a"
               ],
               "VPCId": "vpc-3a4a5a6a",
               "SecurityGroupIds": [
                   "sg-2a3a4a5a"
               ],
               "AvailabilityZones": [
                   "us-west-1c"
               ]
           },
           "Created": true,
           "Deleted": false,
           "EBSOptions": {
               "VolumeSize": 10,
               "VolumeType": "standard",
               "EBSEnabled": true
           },
           "Processing": true,
           "DomainName": "vpc-cli-example",
           "SnapshotOptions": {
               "AutomatedSnapshotStartHour": 0
           },
           "ElasticsearchVersion": "6.2",
           "AccessPolicies": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"},\"Action\":\"es:*\",\"Resource\":\"arn:aws:es:us-west-1:123456789012:domain/vpc-cli-example/*\"}]}",
           "AdvancedOptions": {
               "rest.action.multi.allow_explicit_index": "true"
           },
           "EncryptionAtRestOptions": {
               "Enabled": false
           },
           "ARN": "arn:aws:es:us-west-1:123456789012:domain/vpc-cli-example"
       }
   }