RDS autoscaling through cloudformation

0

I'm trying to create a scaling policy for RDS, but I keep getting a cfn-lint error, and the update fails with an error in cloudformation as well. I followed the documentation. Here's the documentation where I got the "RDSReaderAverageCPUUtilization" from. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-predefinedscalingmetricspecification.html

Here's the snippet of the scaling policy. cfn-lint is explicitly complaining about

  ScalingPolicy:
    Type: AWS::AutoScalingPlans::ScalingPlan
    Properties:
      ApplicationSource: 
        TagFilters:
          - Key: Name
            Values:
              - !Ref Name
      ScalingInstructions: 
        - MinCapacity: 1
          MaxCapacity: 15
          ServiceNamespace: !Sub '${DatabaseName}-autoscaling'
          ScalableDimension: rds:cluster:ReadReplicaCount
          ResourceId: !Sub 'cluster:${DatabaseName}'
          TargetTrackingConfigurations:
            - PredefinedScalingMetricSpecification:
                PredefinedScalingMetricType: "RDSReaderAverageCPUUtilization"
              TargetValue: !Ref TargetValue
              ScaleInCooldown: 300
              ScaleOutCooldown: 300
              EstimatedInstanceWarmup: 300

cfn-lint error:

E3030 You must specify a valid value for PredefinedScalingMetricType (RDSReaderAverageCPUUtilization). Valid values are ["ALBRequestCountPerTarget", "ASGAverageCPUUtilization", "ASGAverageNetworkIn", "ASGAverageNetworkOut"]

Even though I have this cfn-lint was complaining I still tried running the template and got the following from cloudformation:

1 validation error detected: Value 'mysql-autoscaling' at 'scalingInstructions.1.member.serviceNamespace' failed to satisfy constraint: Member must satisfy enum value set: [rds, dynamodb, ec2, ecs, autoscaling] (Service: AWSAutoScalingPlans; Status Code: 400; Error Code: ValidationException; Request ID: c45c24e7-5ff4-4e28-bb83-80e23cb7689c; Proxy: null)

Please advise

질문됨 4달 전265회 조회
1개 답변
0

Hi,

Is your DB instance a MySQL Aurora instance and not standard RDS?

Asking because of the doc at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-scalinginstruction.html#cfn-autoscalingplans-scalingplan-scalinginstruction-scalabledimension saying

rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for 
Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.

Best,

Didier

profile pictureAWS
전문가
답변함 4달 전
  • Hi Didier,

    It is MySQL Aurora version 8.0.mysql_aurora.3.05.1(latest version).

    Thanks,

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠