title: Creating Elasticsearch service with AWS Cloudformation: "Creating Elasticsearch Domain did not stabilize"
body: <p><strong>Thanks in advance!</strong> </p>
  
  <p>Not sure why this is happening and it's extremely annoying since it takes a whole hour to fail.</p>
  
  <p>Any ideas why my Cloudformation Elasticsearch service set up will not stabilize? </p>
  
  <p>It returns this error:
  <strong>Creating Elasticsearch Domain did not stabilize</strong></p>
  
  <pre><code>"elk": {
              "Type": "AWS::Elasticsearch::Domain",
              "Properties": {
                  "AccessPolicies": {
                      "Version": "2012-10-17",
                      "Statement": [
                          {
                              "Effect": "Allow",
                              "Principal": {
                                  "AWS": {
                                      "Fn::GetAtt": [
                                          "esuseraccess",
                                          "Arn"
                                      ]
                                  }
                              },
                              "Action": "es:*",
                              "Resource": {
                                  "Fn::Sub": "arn:aws:es:${AWS::Region}:${AWS::AccountId}:domain/elk"
                              }
                          },
                          {
                              "Sid": "",
                              "Effect": "Allow",
                              "Principal": {
                                  "AWS": "*"
                              },
                              "Action": "es:*",
                              "Resource": {
                                  "Fn::Sub": "arn:aws:es:${AWS::Region}:${AWS::AccountId}:domain/elk"
                              },
                              "Condition": {
                                  "IpAddress": {
                                      "aws:SourceIp": [
                                          "XX.XX.XX.XX",
                                          "XX.XX.XX.XX"
                                      ]
                                  }
                              }
                          }
                      ]
                  },
                  "DomainName": "elk",
                  "EBSOptions": {
                      "EBSEnabled": "True",
                      "VolumeSize": 10,
                      "VolumeType": "gp2"
                  },
                  "ElasticsearchClusterConfig": {
                      "InstanceCount": 1,
                      "InstanceType": "t2.small.elasticsearch"
                  },
                  "ElasticsearchVersion": "5.1",
                  "SnapshotOptions": {
                      "AutomatedSnapshotStartHour": 0
                  }
              },
              "Metadata": {
                  "AWS::CloudFormation::Designer": {
                      "id": "XXXXXXXXXXXX"
                  }
              }
          }
  </code></pre>