【问题标题】:Cannot create Elasticsearch instance in AWS using Cloudformation无法使用 Cloudformation 在 AWS 中创建 Elasticsearch 实例
【发布时间】:2021-07-30 17:02:08
【问题描述】:

我尝试使用 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: ""

即使对我来说失败了,还有什么问题,

提前致谢。

【问题讨论】:

  • 什么问题?你到底得到了什么错误?
  • “创建 Elasticsearch 域不稳定”,在 cloudformation 中显示,并且需要数小时才能失败
  • 当我将实例类型更新为 t3.small.elasticsearch 时它正在工作

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


【解决方案1】:

以下模板对我有用:

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

【讨论】:

  • 是的,它适用于 t3.small.elasticsearch 但当我使用 t2.small.elasticsearch 时它不起作用。
猜你喜欢
  • 1970-01-01
  • 2021-02-17
  • 1970-01-01
  • 2022-01-25
  • 2017-10-16
  • 1970-01-01
  • 2021-04-23
  • 2020-04-23
  • 2018-12-17
相关资源
最近更新 更多