【问题标题】:Invalid instance type when creating elasticsearch domain through cloudformation通过cloudformation创建elasticsearch域时实例类型无效
【发布时间】:2022-01-25 13:47:31
【问题描述】:

我正在尝试通过 CFT 部署弹性搜索域,但出现以下错误:

Invalid instance type: r6g.large.elasticsearch (Service: AWSElasticsearch; Status Code: 409; Error Code: InvalidTypeException;

我的 CFT 是:

Resources:
  ElasticsearchDomain:
    Type: 'AWS::Elasticsearch::Domain'
    Properties:
      DomainName: test
      ElasticsearchVersion: 7.10
      ElasticsearchClusterConfig:
        InstanceCount: '1'
        InstanceType: r6g.large.elasticsearch
      EBSOptions:
        EBSEnabled: true
        Iops: '0'
        VolumeSize: '10'
        VolumeType: 'standard'
      AccessPolicies:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              AWS: '*'
            Action: 'es:*'
            Resource: '*'
      AdvancedOptions:
        rest.action.multi.allow_explicit_index: true
      Tags:
        - Key: foo
          Value: bar
      VPCOptions:
        SubnetIds:
          - Ref: subnet
        SecurityGroupIds:
          - Ref: mySecurityGroup
  vpc:
    Type: 'AWS::EC2::VPC'
    Properties:
      CidrBlock: 10.0.0.0/16
  subnet:
    Type: 'AWS::EC2::Subnet'
    Properties:
      VpcId:
        Ref: vpc
      CidrBlock: 10.0.0.0/24
      AvailabilityZone: us-west-2a
  mySecurityGroup:
    Type: 'AWS::EC2::SecurityGroup'
    Properties:
      GroupDescription: test
      VpcId:
        Ref: vpc
      GroupName: testsg
      SecurityGroupIngress:
        - FromPort: 443
          IpProtocol: tcp
          ToPort: 443
          CidrIp: 0.0.0.0/0

请忽略变量的硬编码,这是为了消除参数的使用。 我可以在文档中看到 r6g.large 确实受支持。该代码在使用this 答案中给出的实例类型时有效,但我的用例需要将 r6g.large 作为实例类型。任何帮助将不胜感激。

【问题讨论】:

  • 我遇到了类似的问题。这是 CloudFormation 上的 OpenSearch 和特定实例类型的问题。目前,在他们解决问题之前唯一的选择是更改为另一种实例类型。

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


【解决方案1】:

问题不在于您的实例类型,而是您在 CFT 中用于 elasticSearch 的版本

ElasticsearchVersion: 7.10

R6G 实例类型需要 Elasticsearch 7.9 或更高版本或任何版本的 OpenSearch。基本上只兼容最新的,请换个版本试试看。

【讨论】:

    猜你喜欢
    • 2021-04-23
    • 2021-07-30
    • 1970-01-01
    • 2021-03-14
    • 1970-01-01
    • 2017-10-16
    • 2020-11-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多