Host Your Web Site In The Cloud: Amazon Web Services Made Easy
392 Pages
English

Host Your Web Site In The Cloud: Amazon Web Services Made Easy

-

Description

Host Your Web Site On The Cloud is your step-by-step guide to this revolutionary approach to hosting and managing your web applications.

Cloud computing gives you the tools you need to prepare and cope with a traffic onslaught. You'll have the confidence to withstand a traffic surge without melting your servers or sending you into bankruptcy.

There are a number of ways to use the cloud to host existing applications, build creative new ones, and improve the cost-effectiveness and efficiency or organizations large and small.

You'll learn how to:

  • gain a thorough understanding of cloud computing
  • master the fundamentals of Amazon Web Services
  • install and configure visual and command line tools
  • store, retrieve, and distribute data quickly and easily
  • build applications that scale
  • manage the monitoring, load balancing, and scaling capabilities of cloud computing
As a developer, you need room & flexibility to be innovative. Why waste time worrying about the technical aspects of server capacity? AWS handles security, load balancing, and server resources virtually so you're not restricted to one physical server.

Subjects

Informations

Published by
Published 21 September 2010
Reads 2
EAN13 9781457191596
Language English
Document size 3 MB

Legal information: rental price per page €. This information is given for information only in accordance with current legislation.

Summary of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix 1. Welcome to Cloud Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. Amazon Web Services Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3. Tooling Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4. Storing Data with Amazon S3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5. Web Hosting with Amazon EC2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 6. Building a Scalable Architecture with Amazon SQS . . . . . . . . . . . . . . . . . . 141 7. EC2 Monitoring, Auto Scaling, and Elastic Load Balancing . . . . . . . . . . . . 179 8. Amazon SimpleDB: A Cloud Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 9. Amazon Relational Database Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 10. Advanced AWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 11. Putting It All Together: CloudList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
HOST YOUR WEB SITE IN THE CLOUD AMAZON WEB SERVICES MADE EASY BYJEFF BARR
iv
Host Your Web Site in the Cloud: Amazon Web Services Made Easy by Jeff Barr
Copyright©2010 Amazon Web Services, LLC, a Delaware limited liability company, 1200 12th Ave S., Suite 1200, Seattle, WA 98144, USA
Program Director: Lisa Lang Technical Editor: Andrew Tetlaw Technical Editor: Louis Simoneau Editor: Kelly Steele Expert Reviewer: Keith Hudgins Printing History: First Edition: September 2010
Chief Technical Officer: Kevin Yank Indexer: Fred Brown Cover Design: Alex Walker
Notice of Rights All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the copyright holder, except in the case of brief quotations embedded in critical articles or reviews.
Notice of Liability The author and publisher have made every effort to ensure the accuracy of the information herein. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors and SitePoint Pty Ltd, nor its dealers or distributors will be held liable for any damages to be caused either directly or indirectly by the instructions contained in this book, or by the software or hardware products described herein.
Trademark Notice Rather than indicating every occurrence of a trademarked name as such, this book uses the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
Helmet image on the cover is a Davida Jet and was kindly provided by http://motociclo.com.au.
Published by SitePoint Pty Ltd Web: www.sitepoint.com Email: business@sitepoint.com
ISBN 9780980576832 Printed and bound in the United States of America
About the Author
Jeff Barr is currently the Senior Evangelist at Amazon Web Services. In this role, Jeff speaks to developers at conferences and user groups all over the world. Jeff joined Amazon.com in 2002 when he realized it was destined to become the next great developer platform, and that he could help make it so. Before coming to Amazon, Jeff ran his own consulting practice, and has also held management and development positions at Microsoft, eByz, KnowNow, and Visix Software.
Jeff earned a Bachelor’s degree in Computer Science from the American University in Washington DC and also took some graduate classes at George Washington University in the same city. Jeff resides in Sammamish, Washington with his wife and their five children. In his spare time he enjoys the great outdoors, electronics, and welding.
About the Technical Editors
Andrew Tetlaw has been tinkering with web sites as a web developer since 1997. He’s ded icated to making the world a better place through the technical editing of SitePoint books, kits, articles, and newsletters. Andrew’s also a busy father of five, enjoys receiving beer showbags, and often neglects his blog at http://tetlaw.id.au/.
Louis Simoneau joined SitePoint in 2009, after traveling from his native Montréal to Calgary and finally Melbourne. He now gets to spend his days learning about cool web technologies, an activity that had previously been relegated to nights and weekends. He enjoys hiphop, spicy food, and all things geeky. His personal web site is http://louissimoneau.com/ and his latest blog project is http://growbuycookeat.com/.
About the Chief Technical Officer
As Chief Technical Officer for SitePoint, Kevin Yank keeps abreast of all that is new and exciting in web technology. Best known for his book,Build Your Own Database Driven Web Site Using PHP & MySQL, he also coauthoredSimply JavaScriptwith Cameron Adams and Everything You Know About CSS Is Wrong!with Rachel Andrew. In addition, Kevin hosts theSitePoint Podcastand cowrites theSitePoint Tech Times, a free email newsletter that goes out to over 240,000 subscribers worldwide.
Kevin lives in Melbourne, Australia and enjoys speaking at conferences, as well as visiting friends and family in Canada. He’s also passionate about performing improvised comedy theater with Impro Melbourne (http://www.impromelbourne.com.au/) and flying light aircraft. Kevin’s personal blog isYes, I’m Canadian(http://yesimcanadian.com/).
v
vi
About SitePoint
SitePoint specializes in publishing fun, practical, and easytounderstand content for web professionals. Visit http://www.sitepoint.com/ to access our blogs, books, newsletters, articles, podcasts, and community forums.
To Carmen,
Thanks for all of your love, support, and encouragement. I couldn't have done it without you!
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Who Should Read This Book? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi What’s Covered in This Book? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi The Book’s Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii The Code Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii Updates and Errata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii The SitePoint Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv The SitePoint Newsletters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv The SitePoint Podcast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv Your Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv Conventions Used in This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv Markup Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv Tips, Notes, and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Chapter 1Welcome to Cloud Computing. . . . . . . . 1 Avoiding a Success Disaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Tell Me about Cloud Computing! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 What’s a Cloud? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 The Programmable Data Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Characterizing the Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Some Common Misconceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Cloud Usage Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Cloud Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Hosting Static Web Sites and Complex Web Applications . . . . . . . . 14 Software Development Life Cycle Support . . . . . . . . . . . . . . . . . . . . 14 Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
x
Demos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Data Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Disaster Recovery and Business Continuity . . . . . . . . . . . . . . . . . . . . 16 Media Processing and Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Business and Scientific Data Processing . . . . . . . . . . . . . . . . . . . . . . 17 Overflow Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Just Recapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 2Amazon Web Services Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Amazon and AWS Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Building Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Dollars and Cents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Key Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 AWS Infrastructure Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Amazon Simple Storage Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Amazon CloudFront . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Amazon Simple Queue Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Amazon SimpleDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Amazon Relational Database Service . . . . . . . . . . . . . . . . . . . . . . . . . 31 Amazon Elastic Compute Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Amazon Elastic MapReduce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Other Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 What We’ve Covered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Chapter 3Tooling Up35. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Skills Expectations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35