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

gefragt vor 4 Monaten265 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 4 Monaten
  • Hi Didier,

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

    Thanks,

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