Scripts & Tools for use with Amazon Web Services EC2 Service


Keywords
aws, amazon, amazonlinux, redhat, centos, ami, tools, amazon-web-services, ec2, redhat-enterprise-linux, ubuntu-bionic, ubuntu-xenial, ubuntu1404, ubuntu1604, ubuntu1804
License
Apache-2.0
Install
pip install ec2tools==0.6.25

Documentation


ec2tools


Contents


Summary

Scripts for use with Amazon Web Services' Elastic Compute Cluster (EC2)

back to the top


Contents

Current Scripts contained in this version of ec2tools:

  • machineimage : Returns the most current Amazon Machine Image Id in a region

  • profileaccount : Profiles an AWS Account to precompile metadata in each region for use at a later time when provisioning EC2 instances. Account data is saved as a local file and contains regional data for:

    • Subnets
    • Security Groups
    • SSH Keypairs

back to the top


Getting Started

See the following resources before getting started:

back to the top


Dependencies

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ec2:Describe*"
            ],
            "Resource": "*"
        }
    ]
 }

back to the top


Supported Operating Systems

Returns most current Amazon Machine Image ID for the following Operating System Types:

back to the top


Installation

Install ec2tools via pip:

$ pip install ec2tools --user

back to the top


Instructions

Example cli commands for machineimage script

::

Return Image for a Particular Region

Format: json (default)

    $ machineimage  --image redhat7.5  --region eu-west-1

redhat7


Return Image & Metadata for a Particular Region

Format: json

    $ machineimage  --image centos7  --region eu-west-1  --details

redhat7


Return the AMI Image Ids for All Regions

Format: json

    $ machineimage  --image amazonlinux1

aml1


Return the AMI Image Ids for All Regions

Format: text

    $ machineimage   --image amazonlinux2   --format text

aml1

back to the top


Help

To display the help menu:

    $ machineimage  --help

ec2tools help

back to the top


Author & Copyright

All works contained herein copyrighted via below author unless work is explicitly noted by an alternate author.

  • Copyright Blake Huber, All Rights Reserved.

back to the top


License

back to the top


Disclaimer

Code is provided "as is". No liability is assumed by either the code's originating author nor this repo's owner for their use at AWS or any other facility. Furthermore, running function code at AWS may incur monetary charges; in some cases, charges may be substantial. Charges are the sole responsibility of the account holder executing code obtained from this library.

Additional terms may be found in the complete license agreement.

back to the top