Firewalls everywhere

On my newly created EC2 instance, I now needed to get my website and database content uploaded. Continuous build jobs are already set up and pushing updates via FTP. I was hoping to simply point the FTP jobs at my new server and all would be right in the world.

Unfortunately, it was easier said than done.

Firewalls

Of course there are firewall issues to overcome in two places: the standard Windows Firewall on the instance itself, and EC2 has a firewall itself which is pretty locked down by default - which is a good thing, naturally.

FTP

Now I thought FTP would be easy enough to configure, just port 21 right? Nope, apparently, FTP uses other ports for the actual data transfer. So as to not bore you (too much!) I'll skip some of the details, but I initially tried to use the FTP server in Windows. After enabling the role service to the Web Server role in the Server Manager and battling with various settings, I gave up. Thankfully, FileZilla came to the rescue.

FileZilla

Setting up FileZilla proved the best choice as I was soon up and running. After installation, it's just a matter of adding my FTP user accounts, configuring the ports and starting it up:

FileZilla Configuration

As you can see, the ports I need to open to enable FTP are 21 and 1024-1030. In the Windows Firewall configuration, simply add the appropriate rules:

Windows Firewall Rule

EC2 FTP Rules

Finally it's just a matter of replicating the rules in the security groups section of the EC2 instance config. Just make sure to add the allowed IP address that can use the ports:

EC2 Security Group Config

The Micro Instance Dilemma

And that was it. My EC2 Micro instance is now up and running my first site. Now I face a dilemma: is the Micro instance going to cut it for all my websites? I have a few websites I want to run on one instance - I definitely don't need any more power than one instance - but will the Micro instance cut it?

After mulling this over for a few days and seeing how my initial site is performing, which as it is a very simple site was working just fine, I decided it may not be so good with all the websites running at the same time on this instance. Onto the Standard instance it is then.

Move to the Standard Instance

I was hoping moving up from the Micro to Standard EC2 instance would be pretty painless, but alas it wasn't quite so. The Micro option supports x64 bit operating systems, so I'd gone with Windows Server 2008 R2 64 bit along site SQL Server 2008 R2 64 bit. However, the Standard instance only supports a 32 bit OS. It's not a huge problem: I just have to go through the Windows Update cycle again with Windows Server 2008 (32 bit) and re-install FileZilla, and I'm pretty much back. All my data is on the separate EBS volume, which I simply attach to the new instance, and I have my "D:" drive back.

All my websites are now running on the Standard instance and I have to say I'm pretty happy - so far at least. It’s my own fault of course, but the Standard instance pricing is a good deal more expensive than I thought I'd be paying, so I'm not ruling out moving elsewhere. The much publicised advantage of scaling by adding additional instances isn't that appealing: I don't think my relatively small sites will attract the high traffic to make this an issue. But you never know I suppose. I can live in hope.


Comment Guidelines
See the FAQ for details on the full rules and guidelines. No Spam. Write clearly and thoughtfully - no bad language.