my instance is getting billed even after buying a reserved instance (AWS) - amazon-web-services

Thanks for looking into this
I have purchased 2 reserved instance on AWS t3a.xlarge + windows and t3a.xlarge + windows + ms SQL for one year with no upfront as the payment method and region as Mumbai(ap-south)
Post the purchase I have launched the 2 instances in the same region with the same configuration AS I checked a day later I was getting billed for those new servers-where the reserved instance was not used.
How should I proceed here?? and where did I made the mistake
thanks in advance

Best way to look at this is through the AWS Cost Management service (Billing). In there you'll find the utilization dashboard and the coverage dashboard of your Reserved instances. That should give you a good idea why the RIs weren't applied.
Because there is a lot of missing information from your question, I'd suggest to check the following:
Regional vs AZ RIs - make sure that you didn't purchase RIs for a specific AZ and then deployed in in a different one (even if the region is the same)
See your hourly usage patterns. It's not attached to an instance, and calculated on a hourly basis.
Check carefully that the RIs you purchased are aligned with exactly what you deployed as you talked about a Windows machine which has several different offerings.
Good luck!

Related

Does cost of EC2 on AWS increase at the same rate as user count?

I'm getting ready to launch a mobile app that I have hosted on AWS with an EC2 instance. ($0.0464 per On Demand Linux t2.medium Instance Hour).
This past month I was charged $112 for the EC2 usage, but only had a handful of internal users testing the private version of the app. It's a fairly simple app, not anything that should require a lot of computing power.
So what I'm wondering is if 10 users and dev team costs $112/mo, what happens if I get 1,000 users, or 10k users? Would the cost increase 100x, 1000x? I can't imagine getting auto-billed for $112,000 for a month of service with a small user base like 10k users.
Thanks for any help and guidance, I don't know much about AWS.
Here are the details of my billing for last month:
The billing page shows 2219 hours of t2.medium during this billing month.
That is the equivalent of 92 days. So, it might be 3 instances running for a full month.
Amazon EC2 is charged when the instance is in the Running state. If you are not using an instance, you can Stop the instance. The attached disks (EBS) will still be charged, but there will be no charge for the instance itself.
The charge is not based on the number of users, nor how 'busy' the instance is. It is simply charged when the instance is 'running'. This is because computer resources are exclusively assigned to instances (CPU, RAM) that nobody else can use.
Bottom line: Stop instances that you don't need. Use the smallest instance type for your use-case to reduce costs.
If you were not aware of the charges involved, you can contact AWS Customer Service and request a refund.
FYI, the T2 and T3 family are great for workloads that occasionally 'burst' but then have low-usage periods, but they are not great for sustained workloads. See: Burstable performance instances - Amazon Elastic Compute Cloud

AWS - Not able to monitor free tier usage

I'm new to AWS and wanted to give it a shot with the free tier offer. I'd like to monitor my usage, especially so I'm aware how many free hours I've left so I don't exceed them. The documentation (and some Google results) say I can find a table called Top Free Tier Service by Usage - but I can't. The Billing & Cost Management Dashboard, where it's supposed to be, does not show this table.
My account is eligible for the free usage tier - I paid attention to it while registering and the dashboard also says that. I've created (and already terminated) the following three instances:
2 EC2 t2.micro
1 Elastic Beanstalk Web Server
They all ran for approx. 10 minutes each.
Does anybody know the reason? Is it just that I have to wait and the data is not in real time or did I screw up something?
I've already done research on my own and was not able to find a solution.
As John suggested, waiting 1 - 2 days solved the issue.

AWS is charging me but the Billing Console doesn't show what the issue is

AWS is charging me but the cost reports aren't showing enough detail to figure out why. I think it might be one EC2 instance I created for the tutorial but I can't figure out how to delete it. Can you help?
I signed up for Amazon free tier and I'm doing the tutorial on https://aws.amazon.com/getting-started/projects/build-modern-app-fargate-lambda-dynamodb-python/?e=gs&p=gsrc
It says on the first page "Many of the services used are included in the AWS Free Tier. For those that are not, the sample application will cost, in total, less than $1/day." So then I finished the first two modules of that tutorial and quit for the day -- I didn't shut down any services (cause the tutorial didn't tell me to) but today I got an email saying I've exceeded my $5 AWS threshold in only e days! The email has a link to a Cost Report that says it's spending $2.16 per day, but it won't tell me what!
I've gone through all the cost explorer reports and they confirm I'm spending money on EC2 but I can't find why. Can you help?
Here's a screenshot of the "Billing Management Console" -- says I spent that money on "EC2". But then when I drilled down into EC2 it wouldn't tell me exactly what.
So I clicked on the AWS Cost Management report and it says I'm spending $2.16 a day but it won't give any more granularity that that because all the advanced reports are monthly and don't yet show the last three days. (Apparently it lets you opt-in to daily/hourly reports but it says it charges a fee for that too so I didn't). So I don't know what specifically is charging.
So I clicked on the EC2 Dashboard. It said I'm using one volumne, 2 elastic ip addresses, and 4 security groups. I figured out how to delete the volume but I can't figure out how to delete the IP address or the security group. Are those charging me money? How do I delete them?
I went to the EC2 Instances and there is one "Volume" in use (basically a docker container created for the tutorial) so I deleted that, but that was well below what the Free Tier provides, so was that the source of my charges? Then I went to the Instances and it says there is one instance so I deleted that too. But it still says I have two IP addresses and comments below say I'm being charged for that.
How can I delete this IP addresses? There is no delete button.
How can I be 100% sure everything is deleted and I'm not getting any more charges?
Turns out the answer was actually a NAT Gateway VPN. That doesn't show up on the billing report screenshots above, but I eventually found it mentioned on the billing and then shut it off.
Unassigned ElasticIP will cost you money.
You delete ElasticIPs by Releasing them.
Security groups does not cost money. In general, for advanced users it is better to create all resources with CloudFormation stack so they can be all cleaned by deleting the stack.
If you have an Elastic IP assigned, and it's not in use, AWS charges you for it, if it's actually assigned to an EC2 instance and used, it's free. (To discourage people from hoarding Elastic IPs.)
When you're in the EC2 web console, click 'Running Instances'. What do you see? How many instances? How many stopped? How many running?
I don't think the security groups can be deleted, and I don't think AWS charges for them.

How to shut down AWS test environment on a particular time

We have a test environment on a AWS elastic beanstalk and I would like to shut this down on weekends and hours not using.
When inquired I got information about a third party tool that does that which I have to pay extra 50$ a month.
Does anybody any how to automatically shutdown/restart ec2 instances/elastic-beanstalk on AWS ?
Please note I am fairly new to AWS and I tried finding out to see if I can do this easily but unable to.
Thanks for any directions.
You can use a solution from AWS: Instance Scheduler
https://aws.amazon.com/answers/infrastructure-management/instance-scheduler/
It's based on instances tags.
If you have an AutoScaling Group in your stack, you can use:
https://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html
With a simple cron expression, you will schedule the size of your ASG.
Skeddly offers 100 free events free tier which would cover your use case https://www.skeddly.com/pricing/
I manage a small development account with 8 EC2 instances, 2 autoscaling groups, and 2 RDS instances, and I schedule them for use about 200 hours a month (approx 50 hours a week.)
I get significant savings over demand and even reserved instances by this type of scheduling tool. I pay about $10 per month. This is a good value, compared to building an maintaining your own scheduler.
Usual disclaimer: Just a happy customer.

How do I associate an AWS EC2 instance with a purchased reserved instance?

We’ve purchased an Amazon Web Services (AWS) reserved instance for an Amazon Elastic Compute Cloud (EC2) instance that is critical to our infrastructure. This instance starts and stops every day at certain time interval.
I see that purchasing a reserved instance 'guarantees' that this instance will reliably start even when AWS is under heavy load, but is there any way to specifically tie this reserved instance to the instance we want to associate with it?
What happens if we add another instance that matches the exact criteria of the reserved instance we’ve purchased?
You don't need to worry or do anything in associating the instance and the purchased Reserved Instance; all those are done automatically by AWS.
The reserved Instance is purely a billing and cost related and it doesn't relate to the technology aspect of an EC2 instance. If any of your running instance matches with any of your purchased Reserved Instance then you benefit from the reduced costing. There isn't any commitment on the SLA or changes at the Instance level which involves Reserved Instance. The same case works when you have 2 reserved instances; if there 2 instances running in your account which matches your reserved instance purchase they the reduced cost would be applied.
Analogy - Super Market Coupon Offer
If the Offer Says, buy 2 units of Product A and get one Product B
absolutely Free. So you look into the offer and take 2 units of
Product A and one Unit of Product B. During the billing as well, the
Point of Sales Person also doesn't look into each and every product
and try to check it offers; rather he or she directly keeps scaning
each and every product against the bar-code scanner and that't it -
when these 3 are scanned, the price for Free-Product is automatically
reversed.
So similarly, you buy the Reserved Instance (Coupon) choosing the AMI,
Region, AZ, Duration etc. You would do all your tech stuff as usual
like deploying, patching, monitoring etc. During the billing, if the
instance(s) you launched matches the Reserved Instance, then the
Reserved pricing would be applied; if not that would be charged at
'On-Demand-Pricing'.
If there is a mismatch between what instance you are running and what instance you have reserved; you will not be using the benefit of Reserved-Instance pricing
and be charged with On-Demand-Pricing. Also you will be wasting the
investment done for the Reserved-Instance
As implied in Naveen's answer, there is no direct way to associate an instance with a reservation.
If you want the reliability, then you must launch instances with unique set of properties (instance type, az and AMI). There is no other way at the moment.
This is supposed to be a comment in Naveen's reply. But as I had no reputation yet to commen, I am adding it as an answer.