Skip to content

Instantly share code, notes, and snippets.

@growtopiajaw
Last active July 26, 2019 07:56
Show Gist options
  • Save growtopiajaw/587f829fed6a8e2e5587ac0f57cf019d to your computer and use it in GitHub Desktop.
Save growtopiajaw/587f829fed6a8e2e5587ac0f57cf019d to your computer and use it in GitHub Desktop.
How to install EC2 API Tools / ec2-api-tools / ec2-

Table of Contents

Install EC2 API Tools

The EC2 API tools are commands that wrap the Amazon EC2 API actions. Refer to the Amazon EC2 documentation for more information.

Before installing, make sure you have the multiverse repository enabled. Add the following lines to the /etc/apt/sources.list file:

Ubuntu

deb http://cdn-aws.archive.ubuntu.com/ubuntu/ bionic multiverse
deb-src http://cdn-aws.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://cdn-aws.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb-src http://cdn-aws.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

Run the following commands to install the tools:

sudo apt update
sudo apt install ec2-api-tools

Check the version of the installed tools:

ec2-version

1.7.5.1 2015-04-15

Debian

NOTE: ec2-api-tools has been replaced with Debian's own euca-2ools because:

Historical note: the original Amazon EC2 API Tools were not DFSG-compliant, but Debian (still) distributes alternate set of DFSG-compliant tools, that are designed to be fully compatible, called euca2ools.

-- Source: Amazon EC2 FAQ - https://wiki.debian.org/Amazon/EC2/FAQ#Q:_Where_can_I_find_the_CLI_tools_to_manage_EC2.3F

Before installing, make sure you have the multiverse repository enabled. Add the following lines to the /etc/apt/sources.list file:

deb http://cdn-aws.deb.debian.org/debian stretch multiverse
deb-src http://cdn-aws.deb.debian.org/debian stretch multiverse
deb http://cdn-aws.deb.debian.org/debian stretch-updates multiverse
deb-src http://cdn-aws.deb.debian.org/debian stretch-updates multiverse

Run the following commands to install the tools:

sudo apt update
sudo apt install euca2ools

Check the version of the installed tools:

euca-version

euca2ools 3.3-devel (Yokohama)

How to use Debian's euca-2ools?

Just like how you would normally use ec2-api-tools but with a minor change. All of the Amazon API commands are included in this tool. euca-2ools is sort of a rewrite of Amazon's own ec2-api-tools but with compliant to the Debian Free Software Guideline (DFSG)

Just substitute (replace) ec2 with euca

Example

  • Before: ec2-import-instance
  • After: euca-import-instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment