- Summary
- Contents
- Getting Started
- Dependencies
- Supported Operating Systems
- Installation
- Instructions
- Help
- Author & Copyright
- License
- Disclaimer
Scripts for use with Amazon Web Services' Elastic Compute Cluster (EC2)
- ec2tools, Version: 0.6.23
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
See the following resources before getting started:
- Python 3.6+ is required.
- Amazon Web Services Account
- An IAM user or Role with at least read-only permissions (sample IAM policy below)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:Describe*"
],
"Resource": "*"
}
]
}
Returns most current Amazon Machine Image ID for the following Operating System Types:
- Amazon Linux 1 2017+
- Amazon Linux 2 2018+
- Redhat 7.3, 7.4, 7.5
- Centos 6, 7
- Ubuntu Trusty 14.04
- Ubuntu Xenial 16.04
- Ubuntu Bionic 18.04
Install ec2tools via pip:
$ pip install ec2tools --user
Example cli commands for machineimage
script
::
Format: json
(default)
$ machineimage --image redhat7.5 --region eu-west-1
Format: json
$ machineimage --image centos7 --region eu-west-1 --details
Format: json
$ machineimage --image amazonlinux1
Format: text
$ machineimage --image amazonlinux2 --format text
To display the help menu:
$ machineimage --help
All works contained herein copyrighted via below author unless work is explicitly noted by an alternate author.
- Copyright Blake Huber, All Rights Reserved.
- Software contained in this repo is licensed under the license agreement.
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.