Context
Right now I'm sending SMS messages using SNS, but without using topics, i.e. directly to the destination phone number. In this action I'm allowed to include "message attributes" (which are basically key-value pairs for metadata).
I have SNS set up to log delivery status of SMS messages to cloudwatch, and then cloudwatch set up to trigger a lambda when these logs are received.
Problem
However, the object received in the logs does not include the message attributes, is there a way to do so ?
Example
The received log looks something like:
{
"notification": {
"messageId": "34d9b400-c6dd-5444-820d-fbeb0f1f54cf",
"timestamp": "2016-06-28 00:40:34.558"
},
"delivery": {
"phoneCarrier": "My Phone Carrier",
"mnc": 270,
"destination": "+1XXX5550100",
"priceInUSD": 0.00645,
"smsType": "Transactional",
"mcc": 310,
"providerResponse": "Message has been accepted by phone carrier",
"dwellTimeMs": 599,
"dwellTimeMsUntilDeviceAck": 1344
},
"status": "SUCCESS"
}