

SNS Costs Too Much
source link: https://remotephone.github.io/posts/SNS_Costs_Too_Much/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

SNS Costs Too Much
AWS SNS, PinPoint, Spending Less
Ever since AWS had to start charging for phone numbers to send SMS messages, my AWS bills have doubled. Three dollars in a month to six dollars isn’t the end of the world, but it’s more than I intended to pay. I dug through my bill to figure out what the costs were coming from and fixed it.
AWS Bill Archaeology
When troubleshooting any cost issues in my accounts, I first head to the Cost Explorer in my root account. This lets me see all costs aggregated across all accounts. Here’s what I saw after selecting the right time frame.
So clearly at the end of March I did something that startd driving up my pinpoint costs. After filtering by account and seeing it was my primary organization account, I wanted to double check it was pinpoint and it’s pretty clear.
Filtering by day, I saw something happened on March 29, but no memory of what it was. I checked Cloudtrail and there were no events for it and nothing in the S3 bucket I keep either. I knew I had some billing alarms set up, but no memory of configuring a pinpoint number for SNS.
If you check pinpoint and don’t have any campaigns set up, it looks like nothing should be running up your charges, which I think is confusing. If you go to AWS SNS, however, you can see Origination Numbers configured and that’s where the charges are coming from.
I deleted the number, which broke my billing alerts, for now.
Fixing the Billing Alerts
I did have a separate account in my organization where I had a number provisioned I had intended to pay for and was already using for some SNS notifications. The easiest and cheapest way to do this was, after decomissioning the other number, to allow my org to post to the SNS topic already connected to an Origination Number.
The easiest way to do this was to modify the access policy on the SNS topic. I added a stanza like the following:
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "SNS:Publish",
"Resource": "arn:aws:sns:us-east-1:123456789012:mytopic",
"Condition": {
"StringEquals": {
"aws:PrincipalOrgID": "<MYORGID>"
}
}
}
I created a simple SNS user to test the publish function and it worked! After updating the Billing Alerts to point to the new topic Arn, things should just work. Good work everybody.
All Done
A quick post, but something I wanted to write up because I can’t be the only one who got tripped up by this. I know AWS had to make this change, but I’ve found it frustrating to work with and behaving in unexpected ways. I also kind of lament how it made a lot of hobby projects that just want to send a text even a little bit more complicated. Thanks for reading.
Recommend
-
40
I like to blog little veins of thought as I see them. We recentlylinked to an article by Facundo Corradini calling out a tweet of ours where we used an...
-
34
Too much rare! Add to FavoritesShareToo much rare!
-
18
Blazor EditForms, an essential tool or too much magic?July 23, 2020 · 6 minute read · Tags: blazorBlazor ships with something called an EditForm.B...
-
15
Taking too much slack out of the rubber band Of late, I keep hearing more and more about elastic this and elastic that. People use it in order to "right-size" their services, and only run the number of instances, pods, or whateve...
-
16
Too much interference? Get in the car Friday, January 12, 2007 Well, I have been pretty frustrated for the past week or so, as I have realized that there is just too much RF and electrical interference in my house. It is mak...
-
8
The Pmarca Guide to StartupsThe Pmarca Guide to Startups Part 6: How much funding is too little? Too much? Jul 3, 2007 In this post, I answer these questions: How much fun...
-
7
As always, It Depends™. The answer depends on the problem one is trying to solve. In this answer, I'll try to address some common motivating forces: Favour smaller code bases If you have 4,000 lines of Spring configuration c...
-
12
When REACT is too much, what do you go with? Apr 17 ・1 min read ...
-
7
South Australia Vs. Too Much Home Solar Once upon a time, the consensus was that renewable energy was too expensive and in too sparse supply to be a viable power source to run ou...
-
7
...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK