Reputation: 17
We have configured S3 bucket to receive Daily SMS usage reports from AWS SNS.
But the S3 bucket is not receiving any reports.
Here is policy we are using:
{
"Version": "2012-10-17",
"Id": "sns-sms-daily-usage-policy",
"Statement": [
{
"Sid": "AllowPutObject",
"Effect": "Allow",
"Principal": {
"Service": "sns.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::bucket-name/*"
},
{
"Sid": "AllowGetBucketLocation",
"Effect": "Allow",
"Principal": {
"Service": "sns.amazonaws.com"
},
"Action": "s3:GetBucketLocation",
"Resource": "arn:aws:s3:::bucket-name"
}
]
}
Upvotes: 0
Views: 1247
Reputation: 269330
To test this, I did the following:
The report finally appeared in my S3 bucket, called:
SMSUsageReports/ap-southeast-2/2018/10/31/001.csv.gz
The content was:
PublishTimeUTC,MessageId,DestinationPhoneNumber,MessageType,DeliveryStatus,PriceInUSD,PartNumber,TotalParts
2018-10-31T06:40:29.247Z,xxx,+61xxx,Promotional,Message has been accepted by phone,0.05878,1,1
So, it seems to take a long time to arrive, but it does arrive.
I also note that the first 100 SMS messages sent to a US number are free, so it is possible that free messages do not generate a usage report (but I used a non-US number, so I don't know whether this is the case).
Upvotes: 2