Failed to stabilize Instance with id

0

I have this problem: Failed to stabilize Instance with id. My CF looks like: Resources: DocumentDBSecurityGroup: Type: AWS::EC2::SecurityGroup Properties: GroupName: 'DocumentDB SG' GroupDescription: !Sub 'Security Group for the DocumentDb' VpcId: !Ref VPC

DocumentDBSubnetGroup: Type: AWS::DocDB::DBSubnetGroup Properties: DBSubnetGroupDescription: "Subnet group for Document DB cluster" DBSubnetGroupName: "document-db-subnet-group" SubnetIds: !Ref PrivateSubnetIds

DocumentDBParameterGroup: Type: AWS::DocDB::DBClusterParameterGroup Properties: Description: "Parameter group for Document DB cluster" Family: docdb4.0 Name: "document-db-paramater-group" Parameters: audit_logs: "disabled"

DocumentDBCluster: Type: AWS::DocDB::DBCluster Properties: BackupRetentionPeriod: 7 DBClusterIdentifier: "docdb" DBSubnetGroupName: !Ref DocumentDBSubnetGroup DBClusterParameterGroupName: !Ref DocumentDBParameterGroup Port: 27017 PreferredBackupWindow: "07:00-09:30" PreferredMaintenanceWindow: "tue:07:00-tue:11:00" VpcSecurityGroupIds: - !Ref DocumentDBSecurityGroup StorageEncrypted: true

DocumentDBInstance: Type: AWS::DocDB::DBInstance DependsOn: - DocumentDBCluster Properties: DBClusterIdentifier: !Ref DocumentDBCluster DBInstanceClass: db.t3.medium DBInstanceIdentifier: "docdb" PreferredMaintenanceWindow: "tue:07:00-tue:11:00"

If i search this problem i find information about RDS (snapshot), but i don't use snapshot in this deployment..

  • Resolved! It was problem with IAM role. I didn't have enough permission.

1 Antwort
0

After some quick checks using the CloudFormation validation function and my own spot checks, there were several hyphens ("-") that needed to be removed. Additionally, I'm running on the assumptions that !Ref VPC, !Ref PrivateSubnetIds, and so forth are filled in with your account-specific IDs.

I've included my revised version of your code block below, and I was able to successfully create the stack in my own AWS account.

AWSTemplateFormatVersion: 2010-09-09
Resources:
    DocumentDBSecurityGroup:
        Type: AWS::EC2::SecurityGroup
        Properties:
            GroupName: 'DocumentDB SG'
            GroupDescription: !Sub 'Security Group for the DocumentDb'
            VpcId: !Ref VPC
    DocumentDBSubnetGroup:
        Type: AWS::DocDB::DBSubnetGroup
        Properties:
            DBSubnetGroupDescription: "Subnet group for Document DB cluster"
            DBSubnetGroupName: "document-db-subnet-group"
            SubnetIds: !Ref PrivateSubnetIds
    DocumentDBParameterGroup:
        Type: AWS::DocDB::DBClusterParameterGroup
        Properties:
            Description: "Parameter group for Document DB cluster"
            Family: docdb4.0
            Name: "document-db-paramater-group"
            Parameters:
                audit_logs: "disabled"
    DocumentDBCluster:
        Type: AWS::DocDB::DBCluster
        Properties:
            BackupRetentionPeriod: 7
            DBClusterIdentifier: "docdb"
            DBSubnetGroupName: !Ref DocumentDBSubnetGroup
            DBClusterParameterGroupName: !Ref DocumentDBParameterGroup
            Port: 27017
            PreferredBackupWindow: "07:00-09:30"
            PreferredMaintenanceWindow: "tue:07:00-tue:11:00"
            VpcSecurityGroupIds: !Ref DocumentDBSecurityGroup
            StorageEncrypted: true
    DocumentDBInstance:
        Type: AWS::DocDB::DBInstance
        DependsOn: DocumentDBCluster
        Properties:
            DBClusterIdentifier: !Ref DocumentDBCluster
            DBInstanceClass: db.t3.medium
            DBInstanceIdentifier: "docdb"
            PreferredMaintenanceWindow: "tue:07:00-tue:11:00"
            
AWS
awsendo
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen