Skip to content
Back to main site

Amazon CloudWatch

Create metric alarms, change their recorded state and write metric data through the tested Query path.

Plan: Pro46 of 55 operations implemented10Known differences

In Vera 1.2.0 preview, metric reads returned no datapoints, and newer CLI versions using CBOR failed some writes that work over Query.

Example checked on Vera 1.2.2, 8 November 2026. Each coverage note names its own evidence and date.

Activate your license key and start the emulator with the Vera launcher, as in Activate Pro, then run this in a terminal of its own, from an empty scratch directory. It gives the official AWS CLI dummy credentials and a config file of its own, so no AWS account is needed and your own AWS profile isn't touched.

Terminal window
export VERA_ENDPOINT="http://localhost:5003"
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test
export AWS_REGION=us-east-1 AWS_DEFAULT_REGION=us-east-1
export AWS_SHARED_CREDENTIALS_FILE=/dev/null
export AWS_EC2_METADATA_DISABLED=true
export AWS_PAGER="" AWS_CLI_AUTO_PROMPT=off
unset AWS_PROFILE AWS_DEFAULT_PROFILE
unset AWS_SESSION_TOKEN AWS_SECURITY_TOKEN
unset AWS_WEB_IDENTITY_TOKEN_FILE AWS_ROLE_ARN AWS_ROLE_SESSION_NAME
unset AWS_CONTAINER_CREDENTIALS_FULL_URI
unset AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
cat > vera-aws-config <<'EOF'
[default]
region = us-east-1
output = json
cli_binary_format = base64
s3 =
addressing_style = path
EOF
export AWS_CONFIG_FILE="$PWD/vera-aws-config"

When you've finished every example in this terminal, close it and delete vera-aws-config, not before.

Use the AWS CLI’s cloudwatch commands. The emulator serves the 2010-08-01 API. Log groups and events are a separate service: see CloudWatch Logs.

Check which protocol your AWS CLI uses. A CloudWatch operation can work over one protocol and fail over another, so which one your client sends matters:

  • AWS Query works. The example was checked with the official AWS CLI 2.31.35, which sends CloudWatch requests over AWS Query. Query accepted every request on this page.
  • Smithy RPC v2 CBOR failed some writes. The official AWS CLI 2.39.5 sends CloudWatch requests over CBOR instead. With it, in testing of Vera 1.2.0 preview, simple reads such as ListMetrics worked, but a valid PutMetricData failed with MissingParameter for Namespace, and the example’s PutMetricAlarm failed with MissingParameter for AlarmName.

Other CLI versions weren’t checked. aws --version shows yours. With a CLI that uses CBOR, don’t downgrade your main installation: install the tested version separately, or write metric data with the Query request at the end of the example, which needs only curl.

Create an alarm on a metric with an Environment dimension, and read it back:

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" cloudwatch put-metric-alarm \
--alarm-name vera-docs-requests --namespace Docs/Audit --metric-name Requests \
--statistic Sum --period 60 --evaluation-periods 1 --threshold 2 \
--comparison-operator GreaterThanThreshold \
--dimensions Name=Environment,Value=docs
aws --endpoint-url "$VERA_ENDPOINT" cloudwatch describe-alarms --alarm-names vera-docs-requests

A new alarm is in INSUFFICIENT_DATA, with the reason Unchecked: Initial alarm creation. Set its state, and read it again:

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" cloudwatch set-alarm-state --alarm-name vera-docs-requests \
--state-value ALARM --state-reason 'Documentation state example'
aws --endpoint-url "$VERA_ENDPOINT" cloudwatch describe-alarms --alarm-names vera-docs-requests

The alarm’s record is now ALARM, with the reason you gave, and it keeps its dimension. That’s a manual state change: the alarm wasn’t evaluated against metric data, and no action ran. These are selected fields:

Output (selected fields)
{
"MetricAlarms": [
{
"AlarmName": "vera-docs-requests",
"StateValue": "ALARM",
"StateReason": "Documentation state example",
"MetricName": "Requests",
"Namespace": "Docs/Audit",
"Dimensions": [
{
"Name": "Environment",
"Value": "docs"
}
]
}
]
}

To clean up, delete the alarm:

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" cloudwatch delete-alarms --alarm-names vera-docs-requests

To write metric data without depending on your CLI’s protocol, send an AWS Query request with curl. This writes a value of 7 to the same metric, with its dimension:

Terminal window
curl --fail-with-body --silent --show-error "$VERA_ENDPOINT/" \
--data-urlencode 'Action=PutMetricData' \
--data-urlencode 'Version=2010-08-01' \
--data-urlencode 'Namespace=Docs/Audit' \
--data-urlencode 'MetricData.member.1.MetricName=Requests' \
--data-urlencode 'MetricData.member.1.Value=7' \
--data-urlencode 'MetricData.member.1.Unit=Count' \
--data-urlencode 'MetricData.member.1.Dimensions.member.1.Name=Environment' \
--data-urlencode 'MetricData.member.1.Dimensions.member.1.Value=docs'

It returns XML with an empty PutMetricDataResult. The emulator accepted this request without an Authorization header; AWS itself doesn’t accept unsigned requests. A successful write doesn’t mean statistics return the data: see Limitations. There’s no operation to delete metric data, so for a clean metric state, start a fresh emulator as in Stop and start again.

  • Metric alarms, with dimensions, created, described, set to a state with SetAlarmState and deleted. In earlier recorded comparisons, the PutMetricAlarm and DeleteAlarms responses matched AWS’s.
  • Metric data over AWS Query: PutMetricData accepted valid writes with and without dimensions, from boto3 1.40.72 and from curl.
  • Listing metrics: ListMetrics answered. What it lists wasn’t checked in detail.
  • Metric streams and tags, on errors only: in earlier recorded comparisons, GetMetricStream, TagResource, UntagResource and ListTagsForResource matched AWS’s error responses. Successful metric streaming and complete tag lifecycles weren’t verified.
  • Also served, not checked in Vera 1.2.0 preview or Vera 1.2.0-rc.3: alarm history, and mute rules and actions. Dashboards, composite alarms, anomaly detectors, Contributor Insights rules and GetMetricData are served too; earlier recorded comparisons on the requests their notes describe found differences.

The main limits are below. A few more apply to every service, and the API coverage notes cover smaller differences.

  • No statistics were returned. In Vera 1.2.0 preview, right after valid writes with and without dimensions, GetMetricStatistics returned an empty Datapoints list. Later reads weren’t tested, so don’t rely on aggregation, percentiles or retention.
  • CBOR writes from newer CLIs failed. Over Smithy RPC v2 CBOR, in Vera 1.2.0 preview, the official AWS CLI 2.39.5’s valid PutMetricData and PutMetricAlarm requests failed with MissingParameter, though the same operations work over AWS Query: see Connect.
  • Alarms weren’t evaluated. Testing changed an alarm’s state only with SetAlarmState. Evaluation against metric data and alarm actions, such as notifications, weren’t tested.
  • Some validation differs. In earlier recorded comparisons, PutCompositeAlarm accepted a rule naming missing alarms and PutInsightRule a rule without Filters, both of which AWS rejected, and a few error codes differ from AWS’s. An earlier build also rejected a GetMetricData request with nested Dimensions that AWS accepted; that wasn’t checked again in Vera 1.2.0 preview or Vera 1.2.0-rc.3.

Every operation in AWS's published 2010-08-01 API (SDK model, botocore 1.43.105), and whether the emulator implements it. Availability combines the earlier implementation inventory with the dated observations below; checking a page's example does not verify every operation. Each note names its evidence first; an observation given without a build or date comes from earlier testing, on 3 November 2026. What the statuses mean

OperationStatusNotes
AssociateDatasetKmsKeyNot implemented
CreateResourceMetricsConfigurationNot implemented
DeleteAlarmMuteRuleImplemented
DeleteAlarmsImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — Deleted the example's alarm.
DeleteAnomalyDetectorImplemented
DeleteDashboardsImplemented
DeleteInsightRulesImplemented
DeleteMetricStreamImplemented
DeleteResourceMetricsConfigurationNot implemented
DescribeAlarmContributorsImplemented
DescribeAlarmHistoryImplemented
DescribeAlarmsKnown differenceRecorded comparison: Earlier build, 3 November 2026 — Adds fields AWS leaves out, set to 0 or empty, such as DatapointsToAlarm, EvaluationInterval, ExtendedStatistic, Metrics and Unit. Local observation: Vera 1.2.0 preview, 5 November 2026 — Returned the example's alarm with its dimension, first in INSUFFICIENT_DATA with the reason Unchecked: Initial alarm creation, then in ALARM with the reason SetAlarmState supplied.
DescribeAlarmsForMetricImplemented
DescribeAnomalyDetectorsImplemented
DescribeInsightRulesImplemented
DisableAlarmActionsImplemented
DisableInsightRulesImplemented
DisassociateDatasetKmsKeyNot implemented
EnableAlarmActionsImplemented
EnableInsightRulesImplemented
GetAlarmMuteRuleImplemented
GetDashboardKnown differenceRecorded comparison: For the tested missing dashboard, the emulator returns DashboardNotFoundError; the AWS recording returns ResourceNotFound. This comparison covers the missing-resource error only.
GetDatasetNot implemented
GetInsightRuleReportKnown differenceRecorded comparison: For the tested missing insight rule, the emulator returns ResourceNotFoundException; the AWS recording returns InvalidParameterValue. Successful report generation was not established by this comparison.
GetMetricDataKnown differenceRecorded comparison: Earlier build, 3 November 2026 — The tested request containing nested Dimensions succeeds in the AWS recording but was rejected by the emulator with InvalidParameterValue. Not checked again in Vera 1.2.0 preview.
GetMetricStatisticsKnown differenceRecorded comparison: Earlier build, 3 November 2026 — For the tested request exceeding the 1,440-data-point range limit, the emulator returns InvalidParameterValue; the AWS recording returns InvalidParameterCombination. This is an error-code difference. Local observation: Vera 1.2.0 preview, 5 November 2026 — Returned an empty Datapoints list right after valid Query writes with and without dimensions; later reads weren't tested.
GetMetricStreamImplemented
GetMetricWidgetImageImplemented
GetOTelEnrichmentImplemented
GetResourceMetricsConfigurationNot implemented
ListAlarmMuteRulesImplemented
ListDashboardsImplemented
ListManagedInsightRulesImplemented
ListMetricStreamsImplemented
ListMetricsImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — Answered, including from official CLI 2.39.5 over CBOR. What it lists wasn't checked in detail.
ListTagsForResourceImplemented
PutAlarmMuteRuleImplemented
PutAnomalyDetectorKnown differenceRecorded comparison: The tested successful AWS response includes AnomalyDetectorId; the emulator response omits it. This compares the response shape and does not verify anomaly-detection execution.
PutCompositeAlarmKnown differenceRecorded comparison: The emulator accepts the tested composite alarm rule with missing referenced alarms; the AWS recording rejects it. This is reference validation, not an IAM authorization comparison.
PutDashboardImplemented
PutInsightRuleKnown differenceRecorded comparison: The emulator accepts the tested rule definition without the required Filters key; the AWS recording rejects it with InvalidParameterValue.
PutLogAlarmNot implemented
PutManagedInsightRulesImplemented
PutMetricAlarmKnown differenceLocal observation: Vera 1.2.0 preview, 5 November 2026 — The tested official CLI 2.31.35's Query request created the example's alarm with its dimension. Official CLI 2.39.5's CBOR request for the same valid alarm failed with MissingParameter AlarmName. Compatibility depends on the transport.
PutMetricDataKnown differenceLocal observation: Vera 1.2.0 preview, 5 November 2026 — Query accepted the tested metric with dimensions. Official CLI 2.39.5's CBOR request failed with MissingParameter Namespace; the tested official CLI 2.31.35 Query request succeeded. Valid Query writes with and without dimensions also succeeded from boto3 1.40.72 and a direct curl request. This replaces an earlier observation that dimensions were rejected over every protocol. Compatibility depends on the transport.
PutMetricStreamImplemented
SetAlarmStateImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — Changed the alarm's recorded state to ALARM with the supplied reason. A manual state change, not metric evaluation or alarm actions.
StartMetricStreamsImplemented
StartOTelEnrichmentImplemented
StopMetricStreamsImplemented
StopOTelEnrichmentImplemented
TagResourceImplemented
UntagResourceImplemented
UpdateOTelEnrichmentNot implemented
UpdateResourceMetricsConfigurationNot implemented