Choose a clear, consistent namespace for your custom metrics. Namespace names must be unique to your application, are case-sensitive, and must not begin with
AWS/. Example: MyApplication.Prerequisites
- An AWS account with permissions to publish CloudWatch metrics (IAM policies that allow
cloudwatch:PutMetricData). - Access to CloudShell or another shell with the AWS CLI configured.
Step 1 — Publish a metric from CloudShell (AWS CLI)
Open CloudShell from the AWS Console and wait until the shell is ready. Use theaws cloudwatch put-metric-data command to send a single data point.
Minimal example — publish one data point:
Use dimensions to add metadata that helps break down metrics by region, service, environment, etc. Example with a single dimension:
Step 2 — Verify the metric in the CloudWatch console
- Open the CloudWatch console.
- Navigate to Metrics → All metrics.
- Select the
MyApplicationnamespace. - Find the
OrdersProcessedmetric and open it to view or graph the data point you published.
- Add this metric to dashboards,
- Create alarms based on the metric,
- Use it in composite or math expressions.

Links and references
- Publishing Metrics to Amazon CloudWatch (AWS Docs)
- AWS CLI
put-metric-datareference - CloudShell — AWS CloudShell overview