This message was deleted.
# general
s
This message was deleted.
w
@bitter-application-91815 I think you would create and attach such a policy using: https://www.pulumi.com/docs/reference/pkg/aws/appautoscaling/
b
yeah i found that api, all seems to make sense but there doesn't seem to be a way to create a custom metric whereby you can put the policy on
Copy code
aws cloudwatch put-metric-data --metric-name MyBacklogPerInstance --namespace MyNamespace \
  --unit None --value 20 --dimensions MyOptionalMetricDimensionName=MyOptionalMetricDimensionValue
I see
CustomizedMetricSpecification
which works perfectly but that needs to point at a custom metric like above
the cloudwatch pulumi package only seems to support metricAlarms
w
I’m not that familiar with this part of AWS, so I apologize in advance if this doesn’t sound right, but https://www.pulumi.com/docs/reference/pkg/aws/appautoscaling/policy/#policytargettrackingscalingpolicyconfigurationcustomizedmetricspecification appears to be able to point at a custom metric (or is the metric being defined in that block). And fwiw, the aws provider is based on the terraform provider in case this example helps: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appautoscaling_policy#target_tracking_scaling_policy_configuration-customized_metric_specification
b
Thanks Mitch, yep i got that far, I think i know how to do it
to create the custom metric and then the above can watch out for it