Skip to Content
Hybrid Cloud for Developers
book

Hybrid Cloud for Developers

by Manoj Hirway
April 2018
Intermediate to advanced content levelIntermediate to advanced
280 pages
8h 37m
English
Packt Publishing
Content preview from Hybrid Cloud for Developers

Launching an EC2 instance

To launch an EC2 instance on AWS, we need:

  • Amazon Machine Image (AMI)
  • Instance type or flavor of the instance
  • Key Pair name

An EC2 instance can be launched using an existing AMI in the same region. There are two important classes used for this purpose. The AmazonEC2Client class is used to instantiate an EC2 client object. This class is used to manage the EC2 resources. Also, the RunInstancesRequest class is used to create a request object that consists of the instance details such as AMI identifier, instance type, key pair, and so on. The request object is then passed to the RunInstances() function of the AmazonEC2Client class. This function then sends a request to AWS to start the specified EC2 instance.

The following ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hybrid Cloud for Architects

Hybrid Cloud for Architects

Alok Shrivastwa
OpenStack: Building a Cloud Environment

OpenStack: Building a Cloud Environment

Alok Shrivastwa, Sunil Sarat, Kevin Jackson, Cody Bunch, Egle Sigler, Tony Campbell

Publisher Resources

ISBN: 9781788830874Supplemental Content