0

在此先感謝!使用AWS Cloudformation創建Elasticsearch服務:「創建Elasticsearch域未穩定」

不知道爲什麼會發生這種情況,這是非常煩人的,因爲它需要一整小時的失敗。

爲什麼我的Cloudformation Elasticsearch服務設置不穩定?

它返回此錯誤: 創建Elasticsearch域沒有穩定

"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" 
       } 
      } 
     } 

回答

2

嘗試將AdvancedOptions定義,至少有默認值。喜歡的東西:

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

它看起來像一個錯誤,因爲它看起來像你不能沒有設置AdvancedOptions創建一個域。有這個已知問題的線程here.

This是原來的帖子,幫助我解決了這個問題。

+0

感謝您的幫助Lorena,這正是問題所在! –

+0

@ JoshuaG.Edwards很高興它工作:) – imTachu