使用AWS Cloudformation创建Elasticsearch服务:“创建Elasticsearch Domain无法稳定”

时间:2017-05-17 08:28:52

标签: amazon-web-services elasticsearch amazon-cloudformation

提前致谢!

不确定为什么会这样,而且非常烦人,因为失败需要一个小时。

我的Cloudformation Elasticsearch服务设置的任何想法都不会稳定下来?

它返回此错误: 创建Elasticsearch Domain没有稳定

"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 个答案:

答案 0 :(得分:2)

尝试设置AdvancedOptions定义,至少使用默认值。类似的东西:

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

它看起来像一个错误,因为看起来你没有设置AdvancedOptions就无法创建一个域。这个已知问题here.

有一个主题

This是帮助我解决此问题的原始帖子。