29 Apr 2015 - Münster (by Dominik)

ec2dns 2.0 - DNS for EC2 instances

Back in 2012 we released the first version of ec2dns, a set of command line tools that makes it easy to display public hostnames of EC2 instances and ssh into them via their tag name.

EC2 instances have random hostname like ec9-99-99-99-99.compute-1.amazonaws.com. These hostnames are quite hard to remember - that's where our tool comes into play. All you have to do is to assign Name tags to your servers, e.g. appserver-1.

Previous versions of ec2dns provided wrapper commands like ec2ssh and ec2scp.

Example for the ec2ssh wrapper

$ ec2ssh appserver-1

To make interacting with EC2 instances even easier, we're going one step further with todays release of ec2dns 2.0, which finally justifies the dns part in the name ec2dns.

Version 2.0 has a built-in DNS server

The wrapper commands are still included, but with the built-in DNS server of ec2dns 2.0 working with EC2 instances is now even better - all you need to know is the Name tag of the instance and add .ec2 to it. Amongst various bugfixes and optimizations ec2dns 2.0 has also been migrated to aws/aws-sdk-php v2.

Some usage examples

ssh into an instance via its name tag

$ ssh appserver-1.ec2

copy a file from an ec2 instance onto your machine

$ scp ubuntu@appserver-1.ec2:/etc/nginx/nginx.conf .

Installing ec2dns

There are a few prerequisites, but aside from them setting up ec2dns is done with just one command.

$ composer global require "fruux/ec2dns=~2.0.0"

If you want to use the DNS feature, you'll just have to make sure that the ec2dns server is running on your system (we have instructions for OS X) and used to resolve anything with the .ec2 TLD.

ec2dns is on GitHub. Check the README.md file if you want to learn more or have a closer look at the installation and update instructions.

Open source at fruux

fruux is powered by a ton of open source software, but we also release a lot of open source software ourselves. ec2dns is really just a tiny example. With sabre/dav and our other sabre/* projects all of our core technology is open source, too and heavily used not just in our own product, but also powers sync features in great products from companies such as Atmail, Box and ownCloud.

We hope that ec2dns (or any of our other open source projects) will be useful for you. Perhaps we'll even see you as a contributor on GitHub soon. :-)

About Dominik

Dominik started fruux back in 2007. He's a lawyer that writes code and has Amazon subscriptions for stuff that normal people buy in the supermarket. Follow him on Twitter or contact him via e-mail.

fruux is a free service that looks after your contacts, calendars and tasks so you don't have to. It makes sure that they are always in sync, no matter which device or operating system you're using. If you've not tried it yet, then why not check us out and let us know what you think! And if you're already using fruux, then we'd love to hear your thoughts and comments. You can also suggest a feature for any upcoming releases or tweet us: @fruux.