Skip to content

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 MyApp

Supported operations ​

AreaOperations
MetricsPutMetricData, GetMetricStatistics, GetMetricData, ListMetrics, GetMetricWidgetImage
AlarmsPutMetricAlarm, PutCompositeAlarm, PutLogAlarm, DescribeAlarms, DescribeAlarmsForMetric, DescribeAlarmHistory, DescribeAlarmContributors, DeleteAlarms, SetAlarmState, EnableAlarmActions, DisableAlarmActions
Alarm mute rulesPutAlarmMuteRule, GetAlarmMuteRule, ListAlarmMuteRules, DeleteAlarmMuteRule
DashboardsPutDashboard, GetDashboard, ListDashboards, DeleteDashboards
Anomaly detectionPutAnomalyDetector, DescribeAnomalyDetectors, DeleteAnomalyDetector
Contributor InsightsPutInsightRule, DescribeInsightRules, EnableInsightRules, DisableInsightRules, DeleteInsightRules, GetInsightRuleReport, PutManagedInsightRules, ListManagedInsightRules
Metric streamsPutMetricStream, GetMetricStream, ListMetricStreams, StartMetricStreams, StopMetricStreams, DeleteMetricStream
DatasetsGetDataset, AssociateDatasetKmsKey, DisassociateDatasetKmsKey
OTel enrichmentGetOTelEnrichment, StartOTelEnrichment, StopOTelEnrichment, UpdateOTelEnrichment
Resource metricsCreate/Get/Update/DeleteResourceMetricsConfiguration
TagsTagResource, 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-cbor protocol 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 ​

MetricValue
PARITY entries audited55 (54 ok, 1 partial)
Feature families7 (7 ok)
Known gapsnone
Structural gaps (can't be emulated)1
Deferred items16
Resource leaksclean

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
OperationWireErrorsStatePersist
PutMetricDataokfixedokok
GetMetricStatisticsfixedokokok
GetMetricDataokokokok
ListMetricsokfixedokok
PutMetricAlarmfixedfixedokok
PutCompositeAlarmokokokok
PutLogAlarmokfixedokok
DescribeAlarmsokokokok
DescribeAlarmsForMetricokokokok
DescribeAlarmHistoryokokokok
DeleteAlarmsokokokok
SetAlarmStateokokokok
EnableAlarmActionsokokokok
DisableAlarmActionsokokokok
GetDatasetokokokok
AssociateDatasetKmsKeyokfixedokok
DisassociateDatasetKmsKeyokokokok
GetOTelEnrichmentokokokok
StartOTelEnrichmentokokokok
StopOTelEnrichmentokokokok
UpdateOTelEnrichmentokokokok
CreateResourceMetricsConfigurationokokokok
GetResourceMetricsConfigurationokokokok
UpdateResourceMetricsConfigurationokokokok
DeleteResourceMetricsConfigurationokokokok
ListTagsForResourceokokokok
TagResourceokokokok
UntagResourceokokokok
PutDashboardokokokok
GetDashboardokokokok
ListDashboardsokokokok
DeleteDashboardsokokokok
PutAlarmMuteRuleokfixedokok
GetAlarmMuteRulefixedokokok
DeleteAlarmMuteRuleokokokok
ListAlarmMuteRulesokokokok
PutAnomalyDetectorokokokok
DeleteAnomalyDetectorokokokok
DescribeAnomalyDetectorspartialokokok
PutInsightRuleokfixedokok
DeleteInsightRulesokokokok
DescribeInsightRulesokokokok
EnableInsightRulesokokokok
DisableInsightRulesokokokok
GetInsightRuleReportokokokok
ListManagedInsightRulesokokokok
PutManagedInsightRulesokokokok
PutMetricStreamfixedfixedokok
GetMetricStreamfixedokokok
ListMetricStreamsokokokok
DeleteMetricStreamokokokok
StartMetricStreamsokokokok
StopMetricStreamsokokokok
DescribeAlarmContributorsfixedokfixedok
GetMetricWidgetImagefixedokn/an/a

Audited Feature Families ​

Feature FamilyStatus
metric-streams-deliveryok
alarm-evaluation-state-machineok
alarm-action-dispatchok
alarm-state-change-subscriptionok
error-codesfixed
persistenceok
insight_rule_apply_on_transformed_logsok

Released under the MIT License.