
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
ec2-instance-manager
Advanced tools
ec2-instance-manager is a command line utility written in ruby to manage Amazon EC2 instances and clusters (launchplan groups) for multiple AWS accounts (customer config keys).
You can launch and terminate EC2 instances, create whole launchplans of instances divided into groups, start all launchplan groups or start a specific launchplan group, assign public IP's and attach volumes.
[sudo] gem install amazon-ec2 ec2-instance-manager
You can either run ec2-instance-manager from a local "config.yml" in your current work directory or use a global ".ec2_instance_manager_config.yml" in your home directory. If a local configuration file in the current work directory is found, it has precendence over the global configuration file.
There are basically two types of launchplan instance definitions:
With the simple type you can quickly launch a number of instances by their AMI ID. This type uses the default settings for availability_zone, instance_type and architecture.
If you need fine-grained control over each instance, you should go for the detailed launchplan instance definition. You can name each instance in a group. Make sure the instance nicknames are unique.
Each definition consists of the following required values:
You can also specify the following optional values:
The instances are created sequentially in order of their definition.
Configuration example:
default: # Default customer config key
amazon_access_key_id: YOUR_ACCESS_KEY
amazon_secret_access_key: YOUR_SECRET
amazon_account_number: YOUR_CUSTOMER_NUMBER
ec2_server_region: "eu-west-1.ec2.amazonaws.com"
key: YOUR_SSH_KEY
availability_zone: eu-west-1a
instance_type: t1.micro
architecture: x86_64 #i386
launch_plan:
webservers:
"ami_id_xxx1": 2
dbservers:
"ami_id_xxx2": 1
detailed:
"appserver1": "ami_id_xxx3;x86_64;t1.micro;"
"appserver2": "ami_id_xxx3;x86_64;t1.micro;192.168.1.1;vol-xxx1@/dev/sdf,vol-xxx2@/dev/sdg"
"appserver3": "ami_id_xxx3;x86_64;t1.micro;;vol-xxx3@/dev/sdf,vol-xxx4@/dev/sdg"
Please have a look at the "config.yml.sample" for further configuration examples.
Run ec2-instance-manager --help for options and commands.
ec2-instance-manager 0.4.0 [options]
-s, --status Status only
-t, --terminate-all Terminates all instances running under a customer config key
-l, --start-launch-plan Starts a launch plan under a customer config key
-g, --group LAUNCH_GROUP_NAME Starts a launch plan group under a customer config key
-c, --config CONFIG_KEY Sets the customer config key
-h, --help Display this screen
Checking the status of your instances/cluster:
ec2-instance-manager -c YOUR_CONFIG_KEY -s
Terminating all instances:
ec2-instance-manager -c YOUR_CONFIG_KEY -t
Terminating all instances of a launch group:
ec2-instance-manager -c YOUR_CONFIG_KEY -g LAUNCH_GROUP_NAME -t
Launching all groups of your launchplan:
ec2-instance-manager -c YOUR_CONFIG_KEY -l
Launching a specific group of your launchplan:
ec2-instance-manager -c YOUR_CONFIG_KEY -g LAUNCH_GROUP_NAME -l
Launching an individual instance without a definition (launch console):
ec2-instance-manager -c YOUR_CONFIG_KEY
Copyright (c) 2009-2011 Oliver Kiessler. See LICENSE for details.
FAQs
Unknown package
We found that ec2-instance-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.