CloudWatch
Parity grade: A · SDK aws-sdk-go-v2/service/cloudwatch@v1.73.3 · last audited 2026-10-07 (88924fa3b)
Category: Management & Governance · View PARITY.md on GitHub · All Services
In-memory CloudWatch metrics and alarms, with dashboards, anomaly detectors, Contributor Insights rules and metric streams.
Quick start
bash
export AWS_ENDPOINT_URL=http://localhost:8000
aws cloudwatch put-metric-data --namespace MyApp --metric-name RequestCount \
--value 42 --unit Count
aws cloudwatch get-metric-statistics --namespace MyApp --metric-name RequestCount \
--start-time 2024-01-01T00:00:00Z --end-time 2024-01-02T00:00:00Z \
--period 3600 --statistics Sum
aws cloudwatch put-metric-alarm --alarm-name HighErrorRate --namespace MyApp \
--metric-name ErrorCount --threshold 100 \
--comparison-operator GreaterThanThreshold \
--evaluation-periods 1 --period 300 --statistic Sum
aws cloudwatch describe-alarms
aws cloudwatch list-metrics --namespace MyAppSupported operations
| Area | Operations |
|---|---|
| Metrics | PutMetricData, GetMetricStatistics, GetMetricData, ListMetrics, GetMetricWidgetImage |
| Alarms | PutMetricAlarm, PutCompositeAlarm, PutLogAlarm, DescribeAlarms, DescribeAlarmsForMetric, DescribeAlarmHistory, DescribeAlarmContributors, DeleteAlarms, SetAlarmState, EnableAlarmActions, DisableAlarmActions |
| Alarm mute rules | PutAlarmMuteRule, GetAlarmMuteRule, ListAlarmMuteRules, DeleteAlarmMuteRule |
| Dashboards | PutDashboard, GetDashboard, ListDashboards, DeleteDashboards |
| Anomaly detection | PutAnomalyDetector, DescribeAnomalyDetectors, DeleteAnomalyDetector |
| Contributor Insights | PutInsightRule, DescribeInsightRules, EnableInsightRules, DisableInsightRules, DeleteInsightRules, GetInsightRuleReport, PutManagedInsightRules, ListManagedInsightRules |
| Metric streams | PutMetricStream, GetMetricStream, ListMetricStreams, StartMetricStreams, StopMetricStreams, DeleteMetricStream |
| Datasets | GetDataset, AssociateDatasetKmsKey, DisassociateDatasetKmsKey |
| OTel enrichment | GetOTelEnrichment, StartOTelEnrichment, StopOTelEnrichment, UpdateOTelEnrichment |
| Resource metrics | Create/Get/Update/DeleteResourceMetricsConfiguration |
| Tags | TagResource, UntagResource, ListTagsForResource |
Behaviour
- A janitor evaluates metric alarms every 10 s and sweeps expired metric data every 5 minutes.
- Alarm state changes run the configured actions for SNS, Lambda, EC2 (
arn:aws:automate) and Auto Scaling targets. - The service also answers the
rpc-v2-cborprotocol used by current SDKs.
Differences from AWS
NOTE
ListMetrics IncludeLinkedAccounts and OwningAccount have no effect. There are no cross-account observability links, so no other account's metrics exist.
Parity & Coverage
| Metric | Value |
|---|---|
| PARITY entries audited | 55 (54 ok, 1 partial) |
| Feature families | 7 (7 ok) |
| Known gaps | none |
| Structural gaps (can't be emulated) | 1 |
| Deferred items | 16 |
| Resource leaks | clean |
Structural Gaps
These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.
- ListMetrics.IncludeLinkedAccounts/OwningAccount (cross-account observability): there are no monitoring-account sink or source-account links, so no other account's metrics exist to include.
Deferred Items
- widget.go / widget_draw.go / widget_font.go (GetMetricWidgetImage PNG rendering internals — not a wire-shape or state-correctness concern, only visual fidelity)
- IMPLEMENTED 2026-08-07 (bd gopherstack-lrmf): metric-stream Firehose delivery -- see families.metric-streams-delivery. Remaining: opentelemetry0.7/opentelemetry1.0 OutputFormat byte-level OTLP protobuf shape not encoded (json only); SetFirehosePutter internal/app/cli.go wiring itself is deferred (forbidden in this pass's scope), so delivery does not fire in a real running gopherstack server yet, only under test with a wired mock/real backend.
- DEEPENED 2026-08-07 (bd gopherstack-lrmf): insight-rule Definition schema validation -- see PutInsightRule row. Remaining: Contribution.Filters per-match-type field shape (Match/In/NotIn/StartsWith/EqualTo/NotEqualTo) and CLF's Fields position-mapping requirement are not enforced, deliberately, since neither is part of the generated SDK model and this pass could not verify their exact shape against a typed struct.
- PutCompositeAlarm.ActionsSuppressor is accepted but ignored: suppression needs a delayed-action scheduler.
- PutCompositeAlarm.ActionsSuppressorWaitPeriod is accepted but ignored: needs the delayed-action scheduler.
- PutCompositeAlarm.ActionsSuppressorExtensionPeriod is accepted but ignored: needs the delayed-action scheduler.
- GetMetricData.LabelOptions is accepted but ignored: label timezone offsets are not rendered.
- PutMetricData.EntityMetricData is accepted but ignored: no entity model.
- PutMetricData.StrictEntityValidation is accepted but ignored: no entity model.
- PutMetricStream.IncludeLinkedAccountsMetrics is accepted but ignored: single-account backend.
- ListMetrics.OwningAccount is accepted but ignored: single-account backend.
- DescribeAlarmHistory.AlarmContributorId is accepted but ignored: no contributor-scoped alarms.
- PutMetricAlarm.EvaluationCriteria (PromQL) is rejected with a validation error: no PromQL engine.
- PutMetricAlarm.EvaluationInterval is rejected with a validation error: it is only valid with PromQL EvaluationCriteria.
- PutMetricAlarm.EvaluateLowSampleCountPercentile is validated and echoed but ignore has no effect: AWS documents no statistical-significance threshold.
- PutLogAlarm.WarmUpConfiguration is accepted but ignored: warm-up is applied to metric alarms only (log alarms have no evaluation loop).
Audited Operations
55 audited operations
| Operation | Wire | Errors | State | Persist |
|---|---|---|---|---|
PutMetricData | ok | fixed | ok | ok |
GetMetricStatistics | fixed | ok | ok | ok |
GetMetricData | ok | ok | ok | ok |
ListMetrics | ok | fixed | ok | ok |
PutMetricAlarm | fixed | fixed | ok | ok |
PutCompositeAlarm | ok | ok | ok | ok |
PutLogAlarm | ok | fixed | ok | ok |
DescribeAlarms | ok | ok | ok | ok |
DescribeAlarmsForMetric | ok | ok | ok | ok |
DescribeAlarmHistory | ok | ok | ok | ok |
DeleteAlarms | ok | ok | ok | ok |
SetAlarmState | ok | ok | ok | ok |
EnableAlarmActions | ok | ok | ok | ok |
DisableAlarmActions | ok | ok | ok | ok |
GetDataset | ok | ok | ok | ok |
AssociateDatasetKmsKey | ok | fixed | ok | ok |
DisassociateDatasetKmsKey | ok | ok | ok | ok |
GetOTelEnrichment | ok | ok | ok | ok |
StartOTelEnrichment | ok | ok | ok | ok |
StopOTelEnrichment | ok | ok | ok | ok |
UpdateOTelEnrichment | ok | ok | ok | ok |
CreateResourceMetricsConfiguration | ok | ok | ok | ok |
GetResourceMetricsConfiguration | ok | ok | ok | ok |
UpdateResourceMetricsConfiguration | ok | ok | ok | ok |
DeleteResourceMetricsConfiguration | ok | ok | ok | ok |
ListTagsForResource | ok | ok | ok | ok |
TagResource | ok | ok | ok | ok |
UntagResource | ok | ok | ok | ok |
PutDashboard | ok | ok | ok | ok |
GetDashboard | ok | ok | ok | ok |
ListDashboards | ok | ok | ok | ok |
DeleteDashboards | ok | ok | ok | ok |
PutAlarmMuteRule | ok | fixed | ok | ok |
GetAlarmMuteRule | fixed | ok | ok | ok |
DeleteAlarmMuteRule | ok | ok | ok | ok |
ListAlarmMuteRules | ok | ok | ok | ok |
PutAnomalyDetector | ok | ok | ok | ok |
DeleteAnomalyDetector | ok | ok | ok | ok |
DescribeAnomalyDetectors | partial | ok | ok | ok |
PutInsightRule | ok | fixed | ok | ok |
DeleteInsightRules | ok | ok | ok | ok |
DescribeInsightRules | ok | ok | ok | ok |
EnableInsightRules | ok | ok | ok | ok |
DisableInsightRules | ok | ok | ok | ok |
GetInsightRuleReport | ok | ok | ok | ok |
ListManagedInsightRules | ok | ok | ok | ok |
PutManagedInsightRules | ok | ok | ok | ok |
PutMetricStream | fixed | fixed | ok | ok |
GetMetricStream | fixed | ok | ok | ok |
ListMetricStreams | ok | ok | ok | ok |
DeleteMetricStream | ok | ok | ok | ok |
StartMetricStreams | ok | ok | ok | ok |
StopMetricStreams | ok | ok | ok | ok |
DescribeAlarmContributors | fixed | ok | fixed | ok |
GetMetricWidgetImage | fixed | ok | n/a | n/a |
Audited Feature Families
| Feature Family | Status |
|---|---|
metric-streams-delivery | ok |
alarm-evaluation-state-machine | ok |
alarm-action-dispatch | ok |
alarm-state-change-subscription | ok |
error-codes | fixed |
persistence | ok |
insight_rule_apply_on_transformed_logs | ok |
