DocsAWS 101BlogServices

CloudWatch

Metrics publish/query, alarms, composite alarms.

Query (form-encoded) multi-tenant 20 operations

Quick start

import boto3
cw = boto3.client("cloudwatch", endpoint_url="http://localhost:4566",
                  region_name="us-east-1",
                  aws_access_key_id="test", aws_secret_access_key="test")
cw.put_metric_data(Namespace="App", MetricData=[{"MetricName":"hits","Value":1}])

Supported operations

20 operations exposed by this service as of MiniStack 1.4.21. Extracted directly from the handler dispatch in the source module.

DeleteAlarms DeleteDashboards DescribeAlarmHistory DescribeAlarms DescribeAlarmsForMetric DisableAlarmActions EnableAlarmActions GetDashboard GetMetricData GetMetricStatistics ListDashboards ListMetrics ListTagsForResource PutCompositeAlarm PutDashboard PutMetricAlarm PutMetricData SetAlarmState TagResource UntagResource

CloudFormation

The CloudFormation engine provisions these resource types via this service:

AWS::CloudWatch::Alarm AWS::CloudWatch::Dashboard

See CloudFormation engine for intrinsic support and lifecycle details.

Known limitations

  • SNS alarm actions are published on state transition; Lambda and other action targets are not invoked.
  • Composite alarm evaluation is stubbed — composite alarms stay INSUFFICIENT_DATA.

Source

  • ministack/services/cloudwatch.py

Read the source to verify the ops list above — dispatch tables and handler functions are the ground truth.