Preface

Amazon Web Services (AWS) is the name of a suite of web services made available by Amazon that allow third-party developers to access and build on the company’s technology platform. This suite includes a number of infrastructure services that can augment or replace the traditional physical infrastructure required by web applications. These infrastructure services provide storage, computing power, a messaging system, a payment system, and a database that can be accessed by anyone with an Amazon.com account and a credit card. Best of all, with these services you pay only for what you use. Whether you are merely experimenting with the services or using them as a platform for web applications serving thousands of users, you rent only the infrastructure you need and only when you need it.

These services offer a compelling alternative to building your applications on top of standard, physical hardware, because they can provide the scalable, reliable, and cost-effective infrastructure components you need without the expense or effort involved in managing your own hardware. They give you the freedom to concentrate on your application instead of the physical platform it runs on. They also significantly reduce the initial investment required to build and offer a service, while giving you confidence that your application will be able to not only survive any sudden attention it receives, but to grow and thrive in response. By leaving the infrastructure management to Amazon, you can focus on developing your application and growing your business.

With the expense of infrastructure removed from the equation, anyone building web applications can compete and succeed based on their innovation, execution, and ideas instead of being limited by their resources. Jeff Bezos, the CEO of Amazon, has famously referred to IT infrastructure and its attendant setup, management, and expense headaches as “muck.” In declaring “We make muck so you don’t have to,” Bezos has offered to handle the mucky, infrastructure side of web applications and allow the rest of us to focus on the interesting side. Perhaps you should take him up on the offer.

What’s in This Book?

In this book we explore the set of web services offered by Amazon that provide pay-as-you-go, virtual infrastructure, and we look at the practicalities of designing and building applications to take advantage of Amazon’s infrastructure services. We will provide detailed sample code that shows how to interact with the services’ application program interfaces (APIs), and we will discuss how the services can be used individually and in combination to build systems in the real world.

The first two chapters introduce the services we will use in this book and discuss how they work at the HTTP messaging level:

Chapter 1

In this chapter, we introduce Amazon’s infrastructure services and discuss the main advantages and disadvantages of using online services to meet your infrastructure needs. To use Amazon’s services effectively, you may have to adjust your mindset and expectations: things work differently in the cloud.

Chapter 2

To interact with the Amazon Web Services, you will need a communications library to create request messages that are structured to be readable to the services, and authenticated so that only you can access your protected data. You will also need to understand the response messages the services return. In this chapter, we describe how to construct and interpret the HTTP messages used by Amazon’s API interfaces. We will also provide code that demonstrates exactly how to work with these messages.

The remaining 11 chapters in the book focus on actually using the services through their API interfaces or by building on third-party libraries or services.

We devote seven chapters to explaining the key concepts, data models, behavior, and APIs of Amazon’s five infrastructure services: S3, EC2, SQS, FPS, and SimpleDB. These chapters describe the features and capabilities of each service and provide an overview of the operations exposed by the service. They also include client implementation code written in Ruby and step-by-step guides to performing tasks with the API operations. You can use our sample code to follow along with the interactive sessions in these chapters and as a starting point for your own applications.

For S3, EC2, and SQS, we have included additional chapters in which we guide you through the process of building fully functional applications based on the services. These applications serve as realistic examples of how to put the infrastructure services to work. In these chapters, we will demonstrate how to use them to perform common tasks, and we will show off some of the many third-party libraries and tools that are available for these services:

Chapter 3

How to use Amazon’s Simple Storage Service (S3) for online data storage.

Chapter 4

Use your online data storage space to share large files with others and back up your files. You can also access your storage as if it were a standard Linux block device, or you can create a mediated access system to grant others limited and well-controlled access to your own S3 storage.

Chapter 5

How to use Amazon’s Elastic Compute Cloud (EC2) service for online computing resources.

Chapter 6

Learn how virtual Linux server instances operate in the EC2 service and how to create your own instances, customized to work exactly the way you want.

Chapter 7

Use virtual servers to create an on-demand, secure VPN for protecting your network traffic, or to host a web site application that will be made available to the public.

Chapter 8

How to use Amazon’s service for online messaging.

Chapter 9

Use messaging to tie together the components of a distributed application. In this chapter we combine the capabilities of the S3, EC2, and SQS services to build a service-oriented application that can convert video and image files or perform other data-processing tasks. We also demonstrate how to automate the management of this application so it can respond to demand without manual intervention.

Chapter 10, Chapter 11, and Chapter 12

How to use Amazon’s Flexible Payments Service (FPS) for financial transactions. FPS is big and complicated enough to need three chapters.

Chapter 13

How to use Amazon’s SimpleDB service as an online database. This chapter includes two simple examples that demonstrate how to load stock price data into your database, and how to implement a local data cache to help speed up your SimpleDB applications.

Get Programming Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.