InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

AWS and EC2

  • AWS benefits
  • Broken sudoers file
  • EBS and reliability/durability
  • EC2 api tools on Ubuntu
  • Install wordpress AWS Classic Ubuntu
  • Linux instance on AWS Classic
  • Mysql access
  • Mysql service and micro instance
  • Route53 as DNS
  • Upgrade Linux micro instance to small
  • ssh automation
 
  • Home
  • > Tutorials
  • > AWS and EC2

Install Amazon EC2 api tools on Ubuntu Linux

By admin on Dec 16, 2015

Amazon EC2 api tools have fairly handy utilities to get information and perform various AWS tasks on your instance. Here are quick steps to install ec2-api-tools package on Amazon EC2 Ubuntu Linux. Note that there are many others tools also listed at Amazon web services developers tools. We’ll stick to Amazon EC2 api tools (ec2-api-tools) for the purpose of this tutorial.

  1. First add AWS tools repository.
    $ sudo apt-add-repository ppa:awstools-dev/awstools
    

    To see what got added

    $ cat /etc/apt/sources.list.d/awstools-dev-awstools-trusty.list 
    deb http://ppa.launchpad.net/awstools-dev/awstools/ubuntu trusty main
    # deb-src http://ppa.launchpad.net/awstools-dev/awstools/ubuntu trusty main
    

    In case you need to remove it later:

    $ sudo apt-add-repository -r ppa:awstools-dev/awstools
    
  2. Update apt packages index and install ec2-api-tools
    $ sudo apt-get update
    $ sudo apt-get install ec2-api-tools
    
  3. Check if api cli tools are working. You will need aws access id , secret key and region for it. You can obtain keys from AWS IAM console. US west coast, region may look like us-west-1. To find the instance type, you can first find instance id using ec2metadata on EC2 instance itself.

    $ ec2metadata | grep instance-id | awk -F": " '{print $2}'
    i-4020bd80
    

    Then run ec2dinatt (or ec2-describe-instance-attribute) on above instance_id.

    $ ec2dinatt -O AWSAccessKeyId -W AWSSecretKey --region region i-i-4020bd80
    

    Sample outcome from above command

    instanceType	i-4020bd80	t2.micro
    

Suggested posts:

  1. How to install mysql 5.7 on Amazon Linux 2
  2. How to create Linux instance on Amazon AWS/EC2 Classic
  3. Install php 7 on Amazon Linux 2
  4. LXC (Linux Containers) – quick start tutorial on Ubuntu
  5. How to install wordpress on Amazon AWS-EC2 Classic Ubuntu Linux micro instance
  6. Ssh automation on Amazon EC2 Ubuntu Linux
  7. How to install Imagemagick on Ubuntu Linux
  8. How to install AWStats on Ubuntu Linux
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged AWS and EC2, Linux/Unix Command Line, Tutorials, Ubuntu Linux

Follow InfoHeap

facebook
twitter
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2021 InfoHeap.

Powered by WordPress