Amazon Elastic Compute Cloud - By Demokloud 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon EC2 Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hypervisors are software, specialized firmware, or both which allow physical hardware to be shared across multiple virtual machines. Type-1 hypervisors Type-1 hypervisors are installed directly to the bare metal in other words they require no software or Operating Systems to be installed ahead of time, and install right onto the hardware you want to run them on. Hyper-V Server and ESXi are two examples of this type of hypervisor used in many places today. The benefit of a Type-1 hypervisor is direct access to the physical hardware, with no operating system getting in the way of the virtual machines using that hardware. This type of hypervisor grew out of virtualization used in mainframe and midframe systems such as IBM power platforms, and morphed into x86-based platforms over time. This makes them perfect for IT operations, but they re not the best fit for casual configurations or desktop work. Type-2 hypervisors Type-2 hypervisors are designed to install onto an existing operating system. This could be the Hyper-V Role on a Windows server or desktop, or Parallels Desktop on a Mac. They tend to have a much lower learning curve, and require far less in terms of hardware horsepower to function, but this comes at a price. Type-2 hypervisors typically cannot run more complex virtual workloads or high-utilization workloads within virtual machines. They re designed for basic development, testing, and emulation (such as running Windows software on a Mac, or running a virtual desktop provided by a company on a personal machine). 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Instance Families 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Machine Images 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
An Amazon Machine Image (AMI) is a template that contains a software configuration (for example, an operating system, an application server, and applications). From an AMI, you launch an instance, which is a copy of the AMI running as a virtual server in the cloud. You can launch multiple instances of an AMI, as shown in the following figure. Your instances keep running until you stop or terminate them, or until they fail. If an instance fails, you can launch a new one from the AMI. 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Instance Lifecycle
Characteristic Reboot Stop/start (Amazon EBSbacked instances only) Host computer The instance stays on the same host computer Private and public IPv4 addresses These addresses stay the same Elastic IP addresses (IPv4) The Elastic IP address remains associated with the instance 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. In most cases, we move the instance to a new host computer. Your instance may stay on the same host computer if there are no problems with the host computer. Hibernate (Amazon EBSbacked instances only) In most cases, we move the instance to a new host computer. Your instance may stay on the same host computer if there are no problems with the host computer. Terminate None The instance keeps its private The instance keeps its private None IPv4 address. The instance gets a IPv4 address. The instance gets a new public IPv4 address, unless new public IPv4 address, unless it has an Elastic IP address, which it has an Elastic IP address, which doesn't change during a stop/start. doesn't change during a stop/start. The Elastic IP address remains The Elastic IP address remains The Elastic IP address is associated with the instance associated with the instance disassociated from the instance Instance store volumes The data is preserved The data is erased The data is erased The data is erased Root device volume The volume is preserved The volume is preserved The volume is preserved The volume is deleted by default RAM (contents of memory) The RAM is erased The RAM is erased The RAM is saved to a file on the The RAM is erased root volume Billing The instance billing hour doesn't change. You stop incurring charges for an instance as soon as its state changes to stopping. Each time an instance transitions from stopped to running, we start a new instance billing period, billing a minimum of one minute every time you restart your instance. You incur charges while the instance is in the stoppingstate, but stop incurring charges when the instance is in the stopped state. Each time an instance transitions from stopped to running, we start a new instance billing period, billing a minimum of one minute every time you You stop incurring charges for an instance as soon as its state changes to shutting-down.
Storage 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Access to an Instance Access to an instance is (for ssh) is through a key pair. Another enabling technology is PKI You generate a private-public key pair, store the private key in your local hard drive, the public key is passed to the instance when it is launched. EC2 instance is configures such that root account is accessible to any user with the private key. 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Static IP By default when you launch a new instance amazon dynamically assign a private and a public IP. While this is fine for development purposed, for a real launch of a web accessible service, we need static IP. Amazon makes available what are classes elastic IPs for this purpose. Up to 5 elastic IPs can be assigned to an instance. Elastic IPs cost money even if you don t use them; assigning and reassigning strains the system; so it cost money Allocate elastic ip and associate it with an instance. 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Getting Started with Amazon EC2 Step 1: Sign up for Amazon EC2 Step 2: Create a key pair Step 3: Launch an Amazon EC2 instance Step 4: Connect to the instance Step 5: Customize the instance Step 6: Terminate instance and delete the volume created 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Creating a key pair AWS uses public-key cryptography to encrypt and decrypt login information. AWS only stores the public key, and the user stores the private key. There are two options for creating a key pair: Have Amazon EC2 generate it for you Generate it yourself using a third-party tool such as OpenSSH, then import the public key to Amazon EC2 Click Create Key Pair Enter a name for the key pair in the Key Pair Name field of the dialog box and click Create The private key file, with.pem extension, will automatically be downloaded by the browser. 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Generating a key pair with Amazon EC2 1. Open the Amazon EC2 console at http://console.aws.amazon.com/ec2/ 2. On the navigation bar select region for the key pair 3. Click Key Pairs in the navigation pane to display the list of key pairs associated with the account 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Launching an Amazon EC2 instance 1. Sign in to AWS Management Console and open the Amazon EC2 console at http://console.aws.amazon.com/ec2/ 2. From the navigation bar select the region for the instance 3. From the Amazon EC2 console dashboard, click Launch Instance 4. On the Create a New Instance page, click Quick Launch Wizard 5. In Name Your Instance, enter a name for the instance 6. In Choose a Key Pair, choose an existing key pair, or create a new one 7. In Choose a Launch Configuration, a list of basic machine configurations are displayed, from which an instance can be launched 8. Click continue to view and customize the settings for the instance 9. Select a security group for the instance. A Security Group defines the firewall rules specifying the incoming network traffic delivered to the instance. Security groups can be defined on the Amazon EC2 console, in Security Groups under Network and Security 10. Review settings and click Launch to launch the instance 11. Close the confirmation page to return to EC2 console 12. Click Instances in the navigation pane to view the status of the instance. The status is pending while the instance is launching 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Connecting to an Amazon EC2 instance There are several ways to connect to an EC2 instance once it s launched. Remote Desktop Connection is the standard way to connect to Windows instances. An SSH client (standalone or web-based) is used to connect to Linux instances. 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Terminating Instances -If the instance launched is not in the free usage tier, as soon as the instance starts to boot, the user is billed for each hour the instance keeps running. -A terminated instance cannot be restarted. -To terminate an instance: 1. Open the Amazon EC2 console 2. In the navigation pane, click Instances 3. Right-click the instance, then click Terminate 4. Click Yes, Terminate when prompted for confirmation 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.