var aws = ;// let's go ahead and provision a few ubuntu instances around the globe.awsallstart;
How about migrating a pre-existing image? Easy:
Awsm is also extendable. Want to add SSH? No problem:
var aws = ;aws
Want a command line interface? This is not the repository you're looking for. Checkout awsm-cli.
Initializes the awsm library.
key- aws key
secret- aws secret
ec2- the ec2 config
regions(array) - regions to use (["us-east-1", "us-west-1", ...])
log- log config
level- the log level to use -
Resource collections share a common API, and are used for every object type which includes
Finds many resources in the target collection.
// find all U.S. regionsawsmec2regions;// find all running instances in a given regionregioninstances;
Finds one resource against a target collection.
// find an image with the given nameregionimages;
Below are a list of available collections to search against
region.instances- instances specific to the region.
region.images- images specific to the region.
Awsm allows you to interface against multiple EC2 regions pretty easily - all you need to do is pass which regions you want to use in the main config.
var aws =
Note that the
regions property is completely optional - awsm will automatically default to
all EC2 regions if the property is omitted.
Here are a few examples of how you might interact with awsm regions:
// init awsmvar awsm = ;// get all regionsawsmec2regionsallonAllRegions;// find all U.S. regionsawsmec2regions;// find ALL instances in ALL regionsawsmec2instancesallonAllInstancesFromAllRegions;// find ALL RUNNING instances in ALL regionsawsmec2instances;
Allows you to tag specific instances, images, security groups, or key pairs.
Updates the tags on the specific resource
Creates a new instance in the target region.
imageId- (required) imageId to use
count- (default = 1) number of instances to create
flavor- (default = t1.micro) type of instance to use (t1.micro, m1.medium)
securityGroup- (optional) the security group object to use with the instance
keyPair- (optional) the key pair object to use with the instance
starts the instance
restarts the instance
stops the instance
creates an image out of the instance
returns all the volumes attached to the instance
returns all the securityGroups attached to the instance
returns the allocated address assigned to the specific instance
returns the image used to create the instance
returns the keypair assigned to the instance
instance tags collection
destroys the instance
creates a new image
creates a new instance from the image
migrates the image to another region
destroys the image
allocates a new address
associates an address with an instance
detaches from an instance
returns the instance associated with the address
address tags collection
releases the address
creates a new volume
attaches to an instance
detaches from an instance
returns all the instances this volume is attached to
creates a new snapshot of the volume
destroys the volume
creates a snapshot
creates a volume out of the snapshot
returns the snapshot associated with the given volume
destroys the snapshot
creates a new keypair
destroys the keypair
creates a security group
authorizes a port in the security group
destroys the security group.
TODO - Checkout the examples at the top.