简体   繁体   中英

Creating a program to manage Amazon EC2 instances

I am attempting to create a program that can manage EC2 instances (create, stop, terminate). I am unfamiliar with the service, and after looking through documentation and searching the web have not found any general advice on creating a management service. My questions are:

What programming environment/language would best be suited to creating a management program?

How can this program interact with EC2 instances? (I've looked into AWS EC2 command line tools . Can these be used from a program to create/terminate instances?)

Any general advice in accomplishing this is appreciated (links to examples especially).

I guess you are new to the cloud and aws world, you can use AWS Command line tools to management the services. Also to make things pretty simpler you can make use of the readily available aws management console if you are only worry is to start, stop or terminate the instance. Also people have build some thing called Config management system like opscode chef which is built of ruby or you can use puppet built of puppet lab's custom DSL.

What programming environment/language would best be suited to creating a management program?

This question cannot be answered in a definite way, rather you should either choose the language you are most comfortable with or that's best suited to your environment/team instead - there are plenty to choose from, most popular major languages are covered by a dedicated SDK (currently Java, .NET, Node.js, Python, PHP, Ruby), see Tools for Amazon Web Services for the detailed listing and links to further information about each.

How can this program interact with EC2 instances?

All the SDKs (and also the command line tools build on top of these) do use the AWS APIs to interact with the respective services (each one has a separate API, but most of them are structured very similar), see Documentation for a listing of all currently available services and links to their documentation:

Welcome to the Amazon Web Services (AWS) Documentation. Whether you are new to AWS or an advanced user, you can find useful information about the services ranging from introductions to advanced features.

To learn how you can get started with AWS, see our Getting Started with AWS guide. If you are interested in learning more about our AWS Free Usage Tier , see our AWS free usage tier article.

I am not sure if you really need a program to do that. The Amazon Management Console ( https://console.aws.amazon.com ) is pretty straight forward, simple to use, you can spin thousands of instances in a very short time. I created 20 instances in about 3 minutes and deleted(terminated) 9 during my first interaction with the technology. Would you provide a use case where this is necessary? Its like you want to create a missile to kill a chicken(rather than buy a knife)

HTH, Thanks, Bles

I used to work on a project that deals a lot with EC2 and one of my responsibility was to manage instances remotly( deploy/start/stor/reboot). I used Java and the Amazon API to write a communication module for the application.

In addition I made a few general ant scripts to deal with code that has to be deploed into an instance. Kind a old fashion way, but works perfectly :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM