How do you delete an AWS CloudWatch metric?

I am decommissioning a service in Amazon Web Services DynamoDB. We have various metrics and alarms for our DyDB tables. I am able to delete the alarms using 'aws cloudwatch delete-alarms --alarm-names ...' but I do not see any AWS CLI command to delete metrics.

I know metrics keep data for 2 weeks. Is it possible that the metrics will automatically disappear in 2 weeks when no more data is being stored in it? I see no documentation stating that, unfortunately.


You're correct, there is no API to delete AWS Cloudwatch Metrics. Just wait two weeks after your last metric has been push, it will disappear automatically

Seb


Since November 1, 2016, CloudWatch has extended the retention of metrics (both custom and AWS NameSpace) from previous 14 days to 15 months.

But the CW console limits the search of metrics to 2 weeks after a metric is last ingested (which means if there is a metric in which no datapoints has been pushed for past 14 days then the CW console will not display it but you can still get it using the cli get-metric-statistics or by tweaking the console url to refer the correct resource name and start and end time older than 14 days).

And there is no api to delete the metrics. https://aws.amazon.com/cloudwatch/faqs/


It seems that aws has added delete action for metric filter. Is it what you needs?

链接地址: http://www.djcxy.com/p/80076.html

上一篇: 跨维度查询AWS CloudWatch自定义指标

下一篇: 如何删除AWS CloudWatch指标?