0

aws ebデプロイコマンドをubuntuに使用して、以下に示すようなcloudformスクリプトを展開しています。私は以下のエラーが表示されます。AWS Cloudformation + Beanstalkエラー無効なYAMLテンプレート

注:他のcloudformスクリプトは問題なく動作します。

Error Invalid Yaml: mapping values are not allowed here in "" CacheSecurityGroupName: Ref: "CacheSecurityGroup" ^, JSON exception: Invalid JSON: Unexpected character (R) at position 0.. Update the configuration file. ERROR: Failed to deploy application.

Resources: 
    CacheSecurityGroupIngress: 
    Type: "AWS::ElastiCache::SecurityGroupIngress" 
    Properties: 
     CacheSecurityGroupName: Ref: "CacheSecurityGroup" 
     EC2SecurityGroupName: Ref: "AWSEBSecurityGroup" 

問題を解決するためのポインタを探してい

答えて

1

あなたはこのように、新しい行にフルRef関数形を使用する必要があり、次のいずれか

Resources: 
    CacheSecurityGroupIngress: 
    Type: "AWS::ElastiCache::SecurityGroupIngress" 
    Properties: 
     CacheSecurityGroupName: 
     Ref: "CacheSecurityGroup" 
     EC2SecurityGroupName: 
     Ref: "AWSEBSecurityGroup" 

...かこのような短い形式:

Resources: 
    CacheSecurityGroupIngress: 
    Type: "AWS::ElastiCache::SecurityGroupIngress" 
    Properties: 
     CacheSecurityGroupName: !Ref "CacheSecurityGroup" 
     EC2SecurityGroupName: !Ref "AWSEBSecurityGroup" 
関連する問題