-
Amazon Web Service’s NEW Reserved Instance Feature
At the start of this month Amazon released a new feature to their reserved instances called Instance Size Flexibility. You can read more about it here. This is quite a handy little update to how they handle reserved instances on a regional setting.
When they first came out, reserved instances were great for the huge savings but a real pita to manage in large environments spanning multiple regions or accounts. In order to take advantage of it you had to make sure you reserved the proper region and instance type for ALL of your individual instances. With few servers of only 1 or 2 types, not a big deal but scale out to hundreds of servers in multiple regions, zones and accounts and you had a recipe for a major accounting and administrative nightmare unless you looked into automation. That all changed in the last quarter of 2016 when Amazon released updates to how RI’s worked.
Read the rest of this entry » -
Resize AWS EC2 EBS drives on the fly with zero downtime
Running out of hard drive space is a bane of every system administrator. Shutting down the server to add another drive then relaunching, or maybe you are lucky enough to have hot swappable hard drives making the process less painful. Well in the cloud on Amazon AWS you no longer need to shutdown or reimage your instance to expand your hard drives. If you are already using EBS backed instances, you now have the ability to modify your volumes on the fly.
This is how you resize your EBS drives on the fly on a EC2 instance. If you are using instance storage you cannot do this obviously, it only works on EBS backed instances.
Read the rest of this entry » -
Amazon AWS costs have improved 55-100% since 2009
I previously wrote an article in 2009 about how much you might expect to pay for hosting your server/services using Amazon AWS EC2 and S3. The conclusion was that it would cost you approximately $920/year up to over $10K/year depending on the instance type you chose to run to host your server on Amazon.
Over the course of time the cost of hosting on Amazon Web Services has come down dramatically and their service offerings have increased 5 fold from what they had. Let’s take a look at what you will pay now versus 2009 for the comparable setups. For the sake of simplicity I am going to use current 4th generation on demand pricing but there are a few cases where it might be cheaper to use 3rd generation over 4th. There are very few good reasons to still be using first generation servers though. It should also be pointed out that Amazon also launched spot instances which are an even cheaper way to run an ec2 instance albeit not necessarily as reliable.
Read the rest of this entry » -
Simple Bash Automation for EC2 Instance Backups using Cron on a Mac Mini
The problem that needed to be solved was to have a simple backup system that could be used to maintain a bunch of EBS backed Windows instances on AWS. We wanted to keep a weeks worth of backups, always discarding the older AMI’s. A local mac mini was used to run the necessary scripts and cron. We didn’t want just EBS snapshots, we wanted a full AMI everyday. There are other solutions if you just want to backup an EBS drive on a schedule, and even for this but this one suits our needs.
-
Logging IP’s on Apache while behind an ELB
We recently had an issue where we had to track the IP’s of the remote hosts connecting to the servers behind our Amazon elastic load balancer. In order to accomplish this we had to adjust the LOGFORMAT of the apache server to log that X-FORWARDED-FOR header that is sent by the ELB. This can vary depending on the server, but you will either need to edit your httpd.conf or apache2.conf file (often in /etc/apache2/).
Add the following to your apache config (comment out the existing settings).
Read the rest of this entry »