There are several things wrong with your costs.
Firstly, you need a single instance and the associated components - for both your sites. From your descriptions it sounds like you are running two instances, each one having its own elastic IP.
Amazon bills by the instance-hour - in a month there are 730 hours (24*365/12) - so if you run one instance for a month, you will be billed for approximately 730 hours. You have indicated that you were billed for 1488 hours - which is just over double 730 (take a month with 31 days, you get 24*31*2 = 1488). If you qualify for the free tier (and t1.micro instances do) the first 730 hours of t1.micro usage in the month will be free. (Your bill would have looked like:
- USD 0.00 hourly fee per Linux/UNIX (free tier), t1.micro instance 744h 0.00
- USD 0.02 hourly fee per Linux/UNIX, t1.micro instance 744h 14.88
If you have only had this account for half a year, it is quite possible you are actually running 3 instances - one falling under the free tier, and the other two are what you are being billed for.
AWS really shines at on-demand tasks - where you need to suddenly launch 10 servers for a couple of hours to handle a spike in demand. If you are going to be running a constant number of servers, you should look into reserved instances. With reserved instances, you pay an up-front fee - for either a 1 year or 3 year term, and get a reduced hourly rate. There are three types of reserved instances, depending on the proportion of time you expect to be running the server: light-utilization, medium-utilization, and heavy-utilization. With all reservations the upfront fee is non-refundable. With the light and medium utilization instances though, you only pay the hourly fee if you use the instance. With the heavy utilization reservation, you pay the hourly fee regardless of whether or not you use the instance.
Let's run the numbers on the scenarios:
- 1 year has 24*365 = 8760 hours
- On demand ($0.02) = $175.20 for the year ($14.60/mo)
- 1 year - heavy reservation ($62 (upfront) + $0.005/h) = $105.80 for the year ($8.81/mo)
- 3 year - heavy reservation ($100 upfront + $0.005/h) = $77.13 for the year ($6.43/mo)
The one downside of the reserved instances is that if you lock in your costs and AWS subsequently reduces their rates, you do not get the new lower rate. Despite this, reserved instances are still an excellent option, and there remains the possibility of selling the reserved instance (or buying one) on the AWS Marketplace which offers a few additional options.
What Free Tier Provides
Free tier gets 30GB of EBS storage, plus a lot of other things, including:
- A single t2.micro EC2 instance
- An elastic load balancer
- 5GB of EFS storage
- An RDS relational database instance, with 20GB of storage and a set number of IOPS
- DynamoDB no-sql database, 25GB plus read/write capacity
- Lambda serverless computing
Plus a whole host of other services. You can see the list here.
What is Free Tier For
The free tier seems to be designed to let you run single instance, with associated services, to help you work out if AWS is right for your workload. I guess they're also trying to get you hooked so you start paying once the year runs out.
Staying Within Free Tier
The best way to stay within this 30GB is to allocate 30GB or less to your EBS volumes. For example, two 15GB volumes, or one 10GB and one 20GB. Personally I would leave a small buffer if you really want to avoid being charged - perhaps try to use less than 29GB. AWS often use GiB, which is different from GB, but the free tier does say GB. A GiB is larger than a GB.
You can use CloudWatch to monitor your resource usage.
Operating Systems and EBS Disk Space
You said Windows server is 19GB, which fits within your free tier. Linux images are significantly smaller than Windows. Since you can only run one instance for free, and each is less than 30GB, this seems fine.
If you want to run two instances you obviously just need to keep the disk space down. With Windows you can do things like use minimal swap space, disable things like hibernation, uninstall components you don't need, etc.
Though you can resize the EBS volume, reducing the size looks problematic, if it's possible at all. I initially suggested creating a large volume, optimizing windows, then reducing the size, but as pointed out by Michael I think you should start with the volume size you need.
Since you have 5GB of EFS included you can consider putting some of your data here. Note that once free tier finishes EBS costs $0.10 per GB but EFS is $0.30 per GB. EBS resizes in a single AZ (data centre), EFS stores data in multiple AZs (data centers). EFS scales to very high throughput as well.
AWS Bill
Will likely still have an AWS bill if you use services outside the free tier. For example you will likely want to take EBS snapshots, which are volume backups. You get 1GB free, but if you use 30GB of disk your compressed snapshots will be significantly more than 1GB.
Best Answer
Free Tier
There's nothing complex here. One hour of EC2 t2.micro usage counts as one hour of free tier usage. EC2 billing is per minute, but it's possible that if you start and stop an instance free tier counts it as an hour. Generally EC2 instances are long lived, rarely stopped and started, so it shouldn't be an issue.
If you run two t2.micro you can run them both for half a month. You probably have multiple EC2 instances running, maybe in another region.
Tracking Down Instances
Check AWS cost explorer in the billing area. AWS Console -> top right menu -> my billing dashboard -> Cost Explorer -> Launch Cost Explorer -> Cost Explorer (left menu). It's weirdly difficult to get into.
Once in Cost Explorer click "service" on the right - click the word service not to the right. Tick "EC2-Instances" then "apply filters". From there you can click "usage type" at the top of the graph. Then look below the graph at the list.
If you can't work it out please edit your post to include screenshots of cost explorer.