I am using Amazon's php sdk.
I use Amazon SNS service to send direct sms. When I send an sms from my php application it gives me a message ID.
I have to track the delivery status of each of my message. I have enabled cloud watch logs for Text Messaging
using Manage text messaging preferences
settings. The IAM role is properly configured and logs end in Cloudwatch.
Now the problem I am facing is that the system creates a random log stream for every message i send.
Here is a screen shot.
I have sent six messages and all of them has been successful( I am sending them to myself). And against every message a single log stream exists.
API gives me a function to get logs based upon LogGroupName and LogGroupStream. The LogGroupName remains the same but LogGroupStream is differnt for every message.
here is the sdk call
$result = $client->getLogEvents([
'endTime' => <integer>,
'limit' => <integer>,
'logGroupName' => '<string>', // REQUIRED
'logStreamName' => '<string>', // REQUIRED
'nextToken' => '<string>',
'startFromHead' => true || false,
'startTime' => <integer>,
]);
How should i get the Logs? Is there a way to tell amazon to log all of sms deliveries to a single LOG STREAM. So i know the stream and can query for logs.