numerous-waitress-3698
05/30/2023, 7:19 AMcreating Application AutoScaling Target: ValidationException: Unsupported service namespace, resource type or scalable dimension
Did anyone face this kinda issue or any idea on this? Please help me with this. Thanks
The script is here,
// RDS Auto Scaling Policy based on Memory Utilization
export function appMemoryScalingPolicy(rdsCpuScalingArgs: any) {
const {
clusterId,
minCapacity = 1,
maxCapacity = 2,
targetValue = 70,
scaleInCooldown = 300,
scaleOutCooldown = 300,
disableScaleIn = false,
} = rdsCpuScalingArgs;
const scalingTarget = new aws.appautoscaling.Target("rdsCpuScalingTarget", {
serviceNamespace: "rds",
scalableDimension: "rds:cluster:ReadReplicaCount",
resourceId: `cluster:${clusterId}`,
minCapacity: minCapacity,
maxCapacity: maxCapacity,
});
return new aws.appautoscaling.Policy("rdsCpuScalingPolicy", {
serviceNamespace: scalingTarget.serviceNamespace,
scalableDimension: scalingTarget.scalableDimension,
resourceId: scalingTarget.resourceId,
policyType: "TargetTrackingScaling",
targetTrackingScalingPolicyConfiguration: {
customizedMetricSpecification: {
metricName: "FreeableMemory",
namespace: "AWS/RDS",
statistic: "Average",
unit: "Bytes"
},
targetValue: targetValue,
scaleInCooldown: scaleInCooldown,
scaleOutCooldown: scaleOutCooldown,
disableScaleIn: disableScaleIn,
},
});
}
quiet-tomato-48326
05/30/2023, 9:48 AMnumerous-waitress-3698
05/30/2023, 9:52 AMappscaling target
and that also didn’t work.. same error there 😐
I’m suspecting whether this is a bug or something. Am I the only one who face this kinda error ?🤔