1

I am trying to deploy an elasticsearch domain through CFT, but getting following error:

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

My CFT is :

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

please ignore the hard coding of variables, that was done to eliminate use of parameters. I can see in documentation that r6g.large is indeed supported. the code works when using instance type as given in this answer, but my use-case requires having r6g.large as instance type. Any help would be appreciated.

1
  • I have run into a similar issue. It was a problem with OpenSearch on CloudFormation and specific instances types. For now the only alternative untill they solve the issue would be changing to another instance type. Commented Dec 25, 2021 at 18:06

1 Answer 1

2

problem isn't with your instance type, it's the version your are using for elasticSearch in your CFT.

ElasticsearchVersion: 7.10

The R6G instance types require Elasticsearch 7.9 or later or any version of OpenSearch. basically it's compatible only with latest one, please change the version and give a try.

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

1 Comment

Does this make sense? Isn't version 7.10 "Elasticsearch 7.9 or later"?

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.