2

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

1 Answer 1

6

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your help Lorena, that was exactly the issue!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.