we are running AWS Infra with various services. We have configured Alarm for Daily budget as well as cost anomalies, but it seems all those comes based on 24 hrs frequency. We have ran into strange problem lost month. It seems there was a bug in our deployment that caused rapid spike in DYNAMODB utilization where the cost spiked thousands of dollar in one or two hours we only come to know at the end of the day where it burns extra thousands of dollars before we actually come to know the bug.
What we are having
we have configured alarms on cost explorer and also tried to check the cost usage based on Granularity with HOURLY but it seems the cost explorer API only keep updates once in every 6 hrs or even more, this was confirmed by AWS support.
Expected solution:
It would be nice we could have visibility over the cost utilization on hourly basis or at least in the interval of 2-3 hrs. I believe AWS cost explore or any service would help here. It would be great if some one could help us directing to the tool that will help us to achieve our use case or any recommendation to tackle this would be much appreciated.
Related
I configured two hourly performance AWS workspaces about 2 months ago. The fee for each is 9.75/mo + .47/hour.
I used each maybe only 3 hours each so I would expect a bill of about $22.32 ((9.75 x 2) + (.47 x 6))but my bill was over $70 (which equals about 100 hours). I reached out to support and this is what they concluded:
As per checking with the Service Team, they have advised that WorkSpaces are billed on a monthly basis, and you pay only for the WorkSpaces you launch that allow end-users to access the documents, applications and resources they need with the device of their choice, including laptops, iPad, Kindle Fire, or Android tablets. So even if the service is on a stop mode, as long as users keep on accessing to the documents, desktops or even domains you have the WorkSpace associated to, will incur in charges.
I am the only user and I didn't interact with the stopped workspaces. I don't have any other AWS services interacting with these workspaces. I don't even understand how users could access "documents, desktops or even domains you have the WorkSpace associated to" if the workspace is stopped.
I have trouble drilling down to the necessary level of detail using the AWS billing dashboard - so I just feel like I have a blindspot here. Why am I getting billed so much? How can I get more details about these Workspace charges?
AWS Support actually called me. They were a big help in demystifying the charges. The short answer is that I'm a dummy. But I wanted to provide an explanation, info and links for others who want to get more details about their own usage and bill.
AWS has a few other helpful ways to get more info. The first was the bill itself (From your billing home page click on 'Bills' in the top left). The first thing I learned was that (1) my bill was $50 not $70. I might have combined my Jan and Feb bill or thought their 'estimate' was the bill. Either way - my baseline was wrong. (2) I also had an RDS instance running which accounted for $16. (3) Finally I could see an exact breakdown of workspace charges. There was the base monthly charge of 9.75. Then there was the .47 hourly charge for 22 hours which accounted for 10.34. The charges we're adding up - but the hours seemed too high.
This was great but I asked if there was a way to see when I used those 22 hours because that was still more than I had recorded myself. He directed me to the cost explorer. On the cost explorer specifically there was a histogram with a button on the top right to "View in Cost Explorer".
There I was able to view how much I was billed per day. Using the group by options on the top we grouped by 'Service' to see this
This showed that nearly all of those hours were on one day. I think that's when I set things up and might not have had AutoStop toggled. So just make sure you have your workspace configured for AutoStop if that's best for you.
For google prediction api in the documentation pages it'showing different quota limits in different places for 10$ plan.
In the above link its saying that the prediction limits are 10000/day
https://cloud.google.com/prediction/
whereas in the next link it's saying the limit is 10,000/month
https://cloud.google.com/prediction/pricing?csw=1
If there is anybody who has used this and could tell me which is the correct one I would really appreciate it.
I'd say it's a typo on the first link. 10K free per day seems way too high -
considering you need to contact Google if you're going to do more than 40K per day (see "Usage Limits).
For now, until a Googler can confirm, I'd go with per month i.e. https://cloud.google.com/prediction/pricing?csw=1
I've been using Copperegg for a while now and have generally been happy with it until lately, where I have had a few issues. It's being used to monitor a number of EC2 instances that must be up 24/7.
Last week I was getting phantom alerts that servers had gone down when they hadn't, which I can cope with, but also I didn't get an alert when I should have done. One server had high CPU for over 5 mins when the alert should be triggered after 1 minute. The Copperegg support weren't not all that helpful, merely agreeing that an alert should have been triggered.
The latter of those problems is unacceptable and if it were to happen again outside of working hours then serious problems will follow.
So, I'm looking for alternative services that will do that same job. I've looked at Datadog and New Relic, but both have a significant problem in that they will only alert me of a problem 5 minutes after it's occurred, rather than the 1 minute I can get with Copperegg.
What else is out there that can do the same job and will also integrate with Pager Duty?
tl;dr : Amazon CloudWatch will do what you want and probably much much more.
I believe that Amazon actually offers a service that would accomplish your goal - CloudWatch (pricing). I'm going to take your points one by one. Note that I haven't actually used it before, but the documentation is fairly clear.
One server had high CPU for over 5 mins when the alert should be triggered after 1 minute
It looks like CloudWatch can be configured to send an alert (which I'll get to) after one minute of a condition being met:
One can actually set conditions for many other metrics as well - this is what I see on one of my instances, and I think that detailed monitoring (I use free), might have even more:
What else is out there that can do the same job and will also integrate with Pager Duty?
I'm assuming you're talking about this. It turns out the Pager Duty has a helpful guide just for integrating CloudWatch. How nice!
Pricing
Here's the pricing page, as you would probably like to parse it instead of me telling you. I'll give a brief overview, though:
You don't want basic monitoring, as it only gives you metrics once per five minutes (which you've indicated is unacceptable.) Instead, you want detailed monitoring (once every minute).
For an EC2 instance, the price for detailed monitoring is $3.50 per instance per month. Additionally, every alarm you make is $0.10 per month. This is actually very cheap if compared to CopperEgg's pricing - $70/mo versus maybe $30 per month for 9 instances and copious amounts of alarms. In reality, you'll probably be paying more like $10/mo.
Pager Duty's tutorial suggests you use SNS, which is another cost. The good thing: it's dirt cheap. $0.60 per million notifications. If you ever get above a dollar in a year for SNS, you need to perform some serious reliability improvements on your servers.
Other shiny things!
You're not just limited to Amazon's pre-packaged metrics! You can actually send custom metrics (time it took to complete a cronjob, whatever) to Cloudwatch via a PUT request. Quite handy.
Submit Custom Metrics generated by your own applications (or by AWS resources not mentioned above) and have them monitored by Amazon CloudWatch. You can submit these metrics to Amazon CloudWatch via a simple Put API request.
(from here)
Conclusion
So all in all: CloudWatch is quite cheap, can do 1-minute frequency stats, and will integrate with Pager Duty.
tl;dr: Server Density will do what you want, on top of that it has web checks and custom metrics too.
In short Server Density is a monitoring tool that will monitor all the relevant server metrics. You can take a look at this page where it’s all described.
One server had high CPU for over 5 mins when the alert should be triggered after 1 minute
Server Density’s open source agent collects and posts the data to their server every minute and you can decide yourself when that alert should be triggered. In the alert below you can see that the alert will alert 1 person after 1 minute and then repeatedly alert every 5 minutes.
There is a lot of other metrics that you can alert on too.
What else is out there that can do the same job and will also integrate with Pager Duty?
Server Density also integrates with PagerDuty. The only thing you need to do is to generate an api key at PagerDuty and then provide that in the settings.
Just provide the API key in the settings and you can then in check pagerduty as one of the alert recipients.
Pricing
You can find the pricing page here. I’ll give you a brief overview of it. The pricing starts at $10 for one server plus one web check and then get’s cheaper per server the more servers you add.
Everything will be monitored once every minute and there is no fees added for the amount of alerts added or triggered, even if that is an SMS to your phone number. The cost is slightly more expensive than the Cloudwatch example, but the support is good. If you used copperegg before they have a migration tool too.
Other shiny things!
Server Density allows you to monitor all the things! Then only thing you need to do is to send us custom metrics which you can do with a plugin written by yourself or by someone else.
I have to say that the graphs that Server Density provides is somewhat akin to eye candy too. Most other monitoring solutions I’ve seen out there have quite dull dashboards.
Conclusion
It will do the job for you. Not as cheap as CloudWatch, but doesn’t lock you in into AWS. It’ll give you 1 minute frequency metrics and integrate with pagerduty + a lot more stuff.
This question is specifically for aws and s3 but it could be for other cloud services as well
Amazon charges for s3 by storage (which is easily estimated with the amount of data stored times the price)
But also charges for requests which is really hard to estimate.. a page that has one image stored in s3 technically gets 1 request per user per visit, but using cache it reduces it. Further more, how can I understand the costs with 1000 users?
Are there tools that will extrapolate data of the current usage to give me estimates?
As you mention, its depending on a lot of different factors. Calculating the cost per GB is not that hard, but estimating the amount of requests is a lot more difficult.
There are no tools that I know of that will calculate the AWS S3 costs based on historic access logs or the like. These calculations would also not be that accurate.
What you can best do is calculate the costs based on the worst case scenario. In this calculation, you assume that nothing will be cached and will assume you will get peak requests all the time. In 99% of the cases, the outcome of that calculation will be lower than what will happen in reality.
If the outcome of that calculation is acceptable pricing wise, you're good to go. If it is way more than your budget allows, then you should think about various ways you could lower these costs (caching being one of them).
Cost calculation beforehand is purely to indicate if the project or environment could realistically stay below budget. Its not meant to provide a 100% accurate estimate beforehand. Most important thing to do is to keep track of the costs after everything has been deployed. Setup billing/budget alerts and check for possible savings.
The AWS pricing calculator should help you get started: https://calculator.aws/
Besides using the calculator, I tend to prefer the actual pricing pages of each individual service and calculate it within a spreadsheet. This gives me a more in-depth overview of the actual costs.
I'm about to go to Pycon, and while I have my hosting at Webfaction one of the tutorials (JKM) asks for students to have AWS instances. I've been trying to figure out what some minimum charge examples might look like? I'll have a lamp server with Django and a requisite amount of storage but next to no traffic.
Anyone have some guidance/advice? My Google searches and look here did not turn up much useful info.
It depends on how long you need to run your instance. A small linux instance will cost 8.5 cents per hour. If you spend a week at Pycon and have your instance running the entire week, it would cost $14.28 for the week. You probably won't need it while you are asleep, so you can turn it off when you are done each day. If you only need it for an hour it will cost you 8.5 cents.
Here's more details on the pricing if you need a bigger server or you need a windows server instead:
http://aws.amazon.com/ec2/#pricing
I think the AWS calculator might help also for estimating cost.
See http://calculator.s3.amazonaws.com/calc5.html
Also try here for a comparison of various different on-demand services (plus rough calculations of how much it would cost to roll it yourself): https://secure.slicify.com/Calculator.aspx
(full disclosure - it's a page on my site).