Monitoring
AWS End User Messaging gives you two complementary views of your MMS messaging, plus a record of your API activity and a way to report message outcomes. This topic describes how to set up each one.
| What you monitor | How it works |
|---|---|
Overall delivery health |
Amazon CloudWatch metrics aggregate your sending into near real-time numbers, such as media spend and messages received, that you watch on dashboards and alarm on. |
Granular per-message events |
Message events report what happened to each individual message as it is sent and delivered. You route them to a destination with a configuration set, or consume them from Amazon EventBridge. |
API activity |
AWS CloudTrail logs the AWS End User Messaging API calls made in your account. |
Outcome feedback |
Message feedback lets you report whether each message reached its intended outcome, so you can track conversion and improve the deliverability signals AWS End User Messaging uses. |
Monitoring with CloudWatch
You can monitor AWS End User Messaging using CloudWatch, which collects raw data and processes it into readable,
near real-time metrics. CloudWatch retains metric data for 15 months, so you can access historical
information and gain a better perspective on how your application is performing. The namespace for
AWS End User Messaging metrics is AWS/SMSVoice. The following table lists common MMS metrics. For
the complete list, see the AWS/SMSVoice namespace in the CloudWatch console.
| Metric | Description |
|---|---|
MediaMessageMonthlySpend | The month-to-date spend on MMS messages, in US Dollars. |
NumberOfMessagesReceived | The number of inbound messages received, including replies to an MMS message. |
| Messages expecting feedback | The number of messages sent with message feedback enabled that are awaiting an outcome. For more information, see Message feedback. |
Note
AWS End User Messaging uses an AWS Identity and Access Management (IAM) service-linked role to publish metrics to CloudWatch. The service creates this role for you the first time you perform an action that publishes metrics, so in most cases you do not need to create it yourself.
Note
For some metrics, the result might be approximate due to the distributed nature of the service. The exact set of CloudWatch delivery metrics emitted for MMS [needs SME confirmation].
Filter metrics by origination identity type
Several metrics in the AWS/SMSVoice namespace support the
OriginationIdentityType dimension, which lets you filter and group a metric by the
type of origination identity that sent the message. For MMS this applies to the media message part metrics (NumberOfMediaMessagePartsSent and NumberOfMediaMessagePartsDelivered) and to MediaMessagesBlockedByProtect.
Use this dimension to compare sending and delivery across the identity types you use, for example to see how many parts were sent through a phone pool versus a sender ID. The dimension takes the following values.
| Value | Description |
|---|---|
PHONE_NUMBER |
Messages sent using a phone number (long code, short code, or toll-free number). |
SENDER_ID |
Messages sent using a sender ID. |
POOL |
Messages sent using a phone pool. When you send through a pool, AWS End User Messaging selects the appropriate origination identity automatically. |
With CloudWatch, you can also create alarms that trigger based on metric thresholds. For example, you can create an alarm on a sending metric so that if more than a chosen number of messages are sent in one hour, an email notification is sent to an Amazon SNS topic. For more information, see Using Amazon CloudWatch alarms in the Amazon CloudWatch User Guide.
Send events to a destination with a configuration set
AWS End User Messaging emits an event for each message as it moves through sending and delivery. You route these events to a destination by creating a configuration set, adding one or more event destinations to it, and then specifying that configuration set when you send. The supported event destinations are Amazon CloudWatch, Amazon Data Firehose, and Amazon SNS.
To route events, create a configuration set, add one or more event destinations to it, and then specify that configuration set when you send. Both steps are shown in each tab.
For the complete list of event types and what each one means, see Event types for SMS, MMS, and voice. For the required IAM roles for each destination type, see Event destinations in AWS End User Messaging.
Send events to a destination with Amazon EventBridge
Unlike the other destinations, you do not add Amazon EventBridge to a configuration set. AWS End User Messaging sends events to Amazon EventBridge automatically, on your account's default event bus. To act on them, write Amazon EventBridge rules on the default bus that match the event type and route to a target such as Lambda, Amazon SNS, or Firehose. AWS End User Messaging sends media delivery status events, including Media Message Delivery Status Updated.
For the full field reference and an example record for every event type, see Messaging Events.
Message feedback
Delivery metrics and events tell you a message was delivered, but not whether it achieved its purpose, such as whether the recipient opened or acted on the message. Message feedback closes that loop: after you send, you report the final outcome, and AWS End User Messaging uses that signal to improve how it routes your traffic.
You can enable message feedback in two ways:
Per message, at send time. Add
--message-feedback-enabledto an individual send request to turn it on for that message only.For every message, on a configuration set. Turn the setting on in a configuration set so that every message you send with that configuration set has feedback enabled.
After you enable it, report the outcome once you know it. The following tabs show the configuration set setting in the console and the per-send flag in the AWS CLI.
If you do not update the record within one hour it is automatically set to FAILED,
and the CloudWatch feedback metrics update only after the record is set to RECEIVED or
FAILED. For the full setup and outcome values, see Message feedback.
Logging API calls with CloudTrail
AWS CloudTrail captures API calls and related events made by or on behalf of your AWS account and delivers the log files to an Amazon S3 bucket that you specify. You can identify which users and accounts called AWS End User Messaging, the source IP address from which the calls were made, and when the calls occurred. For more information, see the AWS CloudTrail User Guide.