Joshua G. Edwards
Joshua G. Edwards

Reputation: 693

Creating Elasticsearch service with AWS Cloudformation: "Creating Elasticsearch Domain did not stabilize"

Thanks in advance!

Not sure why this is happening and it's extremely annoying since it takes a whole hour to fail.

Any ideas why my Cloudformation Elasticsearch service set up will not stabilize?

It returns this error: Creating Elasticsearch Domain did not stabilize

"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"
                }
            }
        }

Upvotes: 2

Views: 6427

Answers (1)

imTachu
imTachu

Reputation: 3809

Try setting the AdvancedOptions definition, at least with the default values. Something like:

"Elasticsearch": {
    "Properties": {
        ...
        "AdvancedOptions": {
            "indices.fielddata.cache.size": "",
             "rest.action.multi.allow_explicit_index": "true"
        },
}

It looks like a bug since it looks like you can't create a domain without setting AdvancedOptions. There is a thread for this known issue here.

This is the original post that helped me solve this issue.

Upvotes: 6

Related Questions