无法使用 Cloudformation 在 AWS 中创建 Elasticsearch 实例

问题描述

我正在尝试使用 cloudformation 在 AWS 中创建 Elasticsearch 实例,但无法创建并显示错误

创建 Elasticsearch 域不稳定。,

这是cloudformation模板,

  Elasticsearch:
    Type: AWS::Elasticsearch::Domain
    Properties:
      DomainName: !Ref ElasticsearchDomainName
      Accesspolicies:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              AWS: '*'
            Action:
              - 'es:*'
            Condition:
              IpAddress:
                'aws:SourceIp':
                  - 12.34.56.78/32
            Resource: '*'
      ElasticsearchVersion: !Ref ElasticsearchVersion 
      ElasticsearchClusterConfig:
        InstanceCount: !Ref InstanceCount 
        InstanceType: t2.small.elasticsearch
      EBSOptions:
        EBSEnabled: true
        VolumeSize: 25
      NodetoNodeEncryptionoptions:
        Enabled: true
      AdvancedOptions:
        rest.action.multi.allow_explicit_index: 'true'
        indices.fielddata.cache.size: !Ref "AWS::Novalue"
    UpdatePolicy:
      EnabLeversionUpgrade: true
    

这个问题似乎已经在这里提到了 here ,但它对我没有用

AdvancedOptions:
       rest.action.multi.allow_explicit_index: 'true'
       indices.fielddata.cache.size: ""

甚至补充说我失败了,还有什么问题,

提前致谢。

解决方法

它使用以下模板对我有用:

Resources:
  Elasticsearch:
    Type: AWS::Elasticsearch::Domain
    Properties:
      AdvancedOptions:
        indices.fielddata.cache.size: ''
        rest.action.multi.allow_explicit_index: 'true'
      DomainEndpointOptions:
        CustomEndpoint: 'mycustomdomain.com'
        CustomEndpointCertificateArn: '{{resolve:ssm:my-cert-arn:1}}'
        CustomEndpointEnabled: true
        EnforceHTTPS: true
      DomainName: 'logs'
      ElasticsearchVersion: 7.10
      ElasticsearchClusterConfig:
        InstanceCount: 1
        InstanceType: t3.small.elasticsearch
      EBSOptions:
        EBSEnabled: true
        VolumeSize: 25
    UpdatePolicy:
      EnableVersionUpgrade: true

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...