-
Notifications
You must be signed in to change notification settings - Fork 3
13._AMIs
Ahmad Abdo edited this page Jun 26, 2017
·
1 revision
$ awsm listImages --help
NAME:
awsm listImages - List Machine Images owned by us
USAGE:
awsm listImages [arguments...]
ARGUMENTS:
[search] - The keyword to search for
awsm listImages awsm-init
This will list all Images owned by your account matching the term awsm-init
, the output should look similar to this:
$ awsm listImages awsm-init
+--------------+-----------+--------------+--------------+-----------+------+------------------------+-------------+-----------+
| NAME | CLASS | CREATED | IMAGE ID | STATE | ROOT | SNAPSHOT ID | VOLUME SIZE | REGION |
+--------------+-----------+--------------+--------------+-----------+------+------------------------+-------------+-----------+
| awsm-init-v2 | awsm-init | 3 months ago | ami-0216d614 | available | ebs | snap-f744727e | 8 GB | us-east-1 |
| awsm-init-v1 | awsm-init | 3 months ago | ami-6315d575 | available | ebs | snap-ca94977e | 8 GB | us-east-1 |
| awsm-init-v3 | awsm-init | 2 months ago | ami-82b00894 | available | ebs | snap-0e3f93097dad56aa2 | 8 GB | us-east-1 |
| awsm-init-v3 | awsm-init | 2 months ago | ami-8dcb5fed | available | ebs | snap-33166d14 | 8 GB | us-west-2 |
| awsm-init-v2 | awsm-init | 3 months ago | ami-b532b7d5 | available | ebs | snap-859e88df | 8 GB | us-west-2 |
| awsm-init-v1 | awsm-init | 3 months ago | ami-ef3db88f | available | ebs | snap-c85b3f88 | 8 GB | us-west-2 |
| awsm-init-v3 | awsm-init | 2 months ago | ami-7aeed21c | available | ebs | snap-0f45e4cd792e24b69 | 8 GB | eu-west-1 |
| awsm-init-v2 | awsm-init | 3 months ago | ami-7ca6821a | available | ebs | snap-6d2d8864 | 8 GB | eu-west-1 |
| awsm-init-v1 | awsm-init | 3 months ago | ami-92a581f4 | available | ebs | snap-9b4ef9a9 | 8 GB | eu-west-1 |
+--------------+-----------+--------------+--------------+-----------+------+------------------------+-------------+-----------+
$ awsm createImage --help
NAME:
awsm createImage - Create a Machine Image from a running instance
USAGE:
awsm createImage [arguments...]
ARGUMENTS:
class - The class of the new image
[search] - The instance to create the image from (optional, defaults setting in class configuration)
awsm createImage example-image dev11
This will create a new AMI with the class of example-image
from a running instance named dev11
, copies it to additonal regions, and rotates out older AMI's. The output should look similar to this:
$ awsm createImage example-image dev11
✓ Found Image Class Configuration for [example-image]!
+-------+-------+------------+-----------+---------------------+--------------+------+----------+---------+---------+-------------------+---------------+---------+----------------------+
| NAME | CLASS | PRIVATE IP | PUBLIC IP | INSTANCE ID | AMI | ROOT | SIZE | STATE | KEYPAIR | AVAILABILITY ZONE | VPC | SUBNET | IAM INSTANCE PROFILE |
+-------+-------+------------+-----------+---------------------+--------------+------+----------+---------+---------+-------------------+---------------+---------+----------------------+
| dev11 | dev | 10.0.2.64 | | i-0fc6a657c8f693220 | awsm-init-v3 | ebs | r3.large | running | awsm | us-west-2a | us-west-2-vpc | Private | awsm |
+-------+-------+------------+-----------+---------------------+--------------+------+----------+---------+---------+-------------------+---------------+---------+----------------------+
▶ Are you sure you want to create an image from this instance and set it as the default for the example-image class?
◀ y
✓ Previous version of image is [2]
△ New version of image is [3]
△ Created Image [ami-c35759ba] named [example-image-v3] in [us-west-2]!
▶ Propagate flag is set, waiting for initial image to complete...
△ Copied image [ami-c35759ba] to region [us-east-1].
△ Copied image [ami-c35759ba] to region [eu-west-1].
▶ Rotate flag is set, looking for images to rotate...
△ Deleted Image [example-image-v1] in [us-west-2]!
△ Deleted Image [example-image-v1] in [us-east-1]!
△ Deleted Image [example-image-v1] in [eu-west-1]!
$ awsm copyImage --help
Incorrect Usage.
NAME:
awsm copyImage - Copy a Machine Image to another region
USAGE:
awsm copyImage [arguments...]
ARGUMENTS:
search - The image to copy
region - The region to copy the image to
awsm copyImage ami-0fe5b719 us-west-1
This will copy the AMI matching the term ami-0fe5b719
to the us-west-1
region, the output should look similar to this:
$ awsm copyImage ami-0fe5b719 us-west-1
△ Created Image [ami-ae6f4dce] named [example-image-v3] to [us-west-1]!
$ awsm deleteImages --help
Incorrect Usage.
NAME:
awsm deleteImages - Delete Machine Images
USAGE:
awsm deleteImages [arguments...]
ARGUMENTS:
search - The search term for images to delete
[region] - The region of the images (optional)
awsm deleteImages ami-ae6f4dce
This will delete the Image matching the term ami-ae6f4dce
, the output should look similar to this:
$ awsm deleteImages ami-ae6f4dce
+------------------+---------------+---------------+--------------+---------+------+-------------+-------------+-----------+
| NAME | CLASS | CREATED | IMAGE ID | STATE | ROOT | SNAPSHOT ID | VOLUME SIZE | REGION |
+------------------+---------------+---------------+--------------+---------+------+-------------+-------------+-----------+
| example-image-v3 | example-image | 2 minutes ago | ami-ae6f4dce | pending | ebs | | 8 GB | us-west-1 |
+------------------+---------------+---------------+--------------+---------+------+-------------+-------------+-----------+
▶ Are you sure you want to delete these Images?
◀ y
△ Deleted Image [example-image-v3] in [us-west-1]!
✓ Done!