Amazon Elastic Compute Cloud User Guide for Linux API Version 2014-10-01 Amazon Elastic Compute Cloud User Guide for Linux
Total Page:16
File Type:pdf, Size:1020Kb
Amazon Elastic Compute Cloud User Guide for Linux API Version 2014-10-01 Amazon Elastic Compute Cloud User Guide for Linux Amazon Elastic Compute Cloud: User Guide for Linux Copyright © 2014 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. The following are trademarks of Amazon Web Services, Inc.: Amazon, Amazon Web Services Design, AWS, Amazon CloudFront, Cloudfront, CloudTrail, Amazon DevPay, DynamoDB, ElastiCache, Amazon EC2, Amazon Elastic Compute Cloud, Amazon Glacier, Kinesis, Kindle, Kindle Fire, AWS Marketplace Design, Mechanical Turk, Amazon Redshift, Amazon Route 53, Amazon S3, Amazon VPC. In addition, Amazon.com graphics, logos, page headers, button icons, scripts, and service names are trademarks, or trade dress of Amazon in the U.S. and/or other countries. Amazon©s trademarks and trade dress may not be used in connection with any product or service that is not Amazon©s, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Elastic Compute Cloud User Guide for Linux Table of Contents What Is Amazon EC2? ................................................................................................................... 1 Features of Amazon EC2 ........................................................................................................ 1 How to Get Started with Amazon EC2 ....................................................................................... 2 Related Services ................................................................................................................... 2 Accessing Amazon EC2 ......................................................................................................... 3 Pricing for Amazon EC2 ......................................................................................................... 4 Instances and AMIs ............................................................................................................... 4 Instances ..................................................................................................................... 5 AMIs ........................................................................................................................... 6 Regions and Availability Zones ................................................................................................ 7 Region and Availability Zone Concepts .............................................................................. 7 Describing Your Regions and Availability Zones .................................................................. 9 Specifying the Region for a Resource .............................................................................. 11 Launching Instances in an Availability Zone ...................................................................... 12 Migrating an Instance to Another Availability Zone ............................................................. 13 Root Device Volume ............................................................................................................. 14 Root Device Storage Concepts ...................................................................................... 14 Choosing an AMI by Root Device Type ............................................................................ 16 Determining the Root Device Type of Your Instance ............................................................ 17 Changing the Root Device Volume to Persist .................................................................... 17 Setting Up .................................................................................................................................. 20 Sign Up for AWS ................................................................................................................. 20 Create an IAM User ............................................................................................................. 21 Create a Key Pair ................................................................................................................ 22 Create a Virtual Private Cloud (VPC) ....................................................................................... 24 Create a Security Group ....................................................................................................... 24 Getting Started ............................................................................................................................ 26 Step 1: Launch an Instance ................................................................................................... 27 Step 2: Connect to Your Instance ............................................................................................ 28 Option 1: Connect Using Your Browser ............................................................................ 29 Option 2: Connect from Windows Using PuTTY ................................................................. 30 Option 3: Connect from Mac or Linux Using an SSH Client .................................................. 31 Step 3: Add a Volume ........................................................................................................... 31 Step 4: Clean Up ................................................................................................................. 34 Best Practices ............................................................................................................................. 36 Tutorial: Installing a LAMP Web Server ............................................................................................ 38 Tutorial: Hosting a WordPress Blog ................................................................................................. 45 Amazon Machine Images .............................................................................................................. 53 Using an AMI ...................................................................................................................... 53 Creating Your Own AMI ......................................................................................................... 54 Buying, Sharing, and Selling AMIs .......................................................................................... 54 Deregistering Your AMI ......................................................................................................... 54 Amazon Linux ..................................................................................................................... 54 AMI Types .......................................................................................................................... 55 Launch Permissions ..................................................................................................... 55 Storage for the Root Device ........................................................................................... 55 Virtualization Types .............................................................................................................. 58 Finding a Linux AMI ............................................................................................................. 58 Finding a Linux AMI Using the Amazon EC2 Console ......................................................... 59 Finding an AMI Using the Command Line ........................................................................ 59 Shared AMIs ....................................................................................................................... 60 Finding Shared AMIs .................................................................................................... 60 Making an AMI Public ................................................................................................... 63 Sharing an AMI with Specific AWS Accounts .................................................................... 64 Using Bookmarks ........................................................................................................ 66 API Version 2014-10-01 iii Amazon Elastic Compute Cloud User Guide for Linux Guidelines for Shared Linux AMIs ................................................................................... 66 Paid AMIs ........................................................................................................................... 70 Selling Your AMI .......................................................................................................... 70 Finding a Paid AMI ....................................................................................................... 71 Purchase a Paid AMI .................................................................................................... 71 Getting the Product Code for Your Instance ...................................................................... 72 Using Paid Support ...................................................................................................... 72 Bills for Paid and Supported AMIs ................................................................................... 73 Managing Your AWS Marketplace Subscriptions ................................................................ 73 Creating an Amazon EBS-Backed Linux AMI ............................................................................ 74 Overview of the