Architecting On AWS 2.5 Student Guide
Architecting On AWS 2.5 Student Guide
Student Guide
Version 2.5
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
TABLE OF CONTENTS
AWS Essentials Student Guide ........................................................................... 4
AWS History ...................................................................................................... 7
Cloud Computing Paradigm ............................................................................ 12
Elastic Capacity .............................................................................................. 18
Security ........................................................................................................... 25
Global Infrastructure ........................................................................................ 41
AWS Services .................................................................................................. 46
Compute Services ........................................................................................... 66
Programmable Infrastructure ........................................................................... 89
Managed Services .......................................................................................... 95
Resources ...................................................................................................... 99
Appendix .......................................................................................................... 106
qwikLAB Guide .............................................................................................. 106
S3 Exercise ................................................................................................... 107
Elastic Load Balancing Exercise ................................................................... 114
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWS Essentials
This training introduces AWS products and services with exercises and hands-on
activities. It helps learners who do not come with a background on Amazon Web
Services to gain proficiency in AWS services and empowers them to make
informed decisions about IT solutions based on business requirements.
AWS Essentials Student Guide 2.5
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Course Overview
This is the high level agenda for our 1-day training.
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Course Learning Objectives
High level learning objectives for this 1-day training.
AWS Essentials Student Guide 2.5
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Background on AWS
A little history on Amazon Web Services and Amazon as a company.
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWS History
This is the high level agenda for this section.
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
About Amazon
Amazon.com, Inc. is an American multinational electronic commerce company
with headquarters in Seattle, Washington, United States. It is the world's largest
online retailer. Amazon.com started as an online bookstore, but soon diversified,
selling DVDs, CDs, MP3 downloads, software, video games, electronics, apparel,
furniture, food, toys, and jewelry. The company also produces consumer
electronicsnotably the Amazon Kindle e-book reader and the Kindle Fire tablet
computerand is a major provider of cloud computing services.
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
More Information
Learn more about Amazon Web Services (AWS):
http://aws.amazon.com
10
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
History of AWS
AWS Mission: Enable businesses and developers to use web services* to build
scalable, sophisticated applications.
*What people now call the cloud
11
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
12
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWS Cloud Services Paradigm
AWS is a collection of Infrastructure Services. It is the customers responsibility
to combine individual IaaS building blocks to meet their business requirements.
13
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
14
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
15
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWS Utility Model
Since 2006, Amazon Web Services have been providing on demand, pay-asyou-go infrastructure to businesses of all sizes.
16
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
On-Premise vs. Cloud Computing
Some benefits of cloud computing are zero capital expenditure and no longterm contracts.
Instead of paying for and organizing all of the physical requirements of an onpremise data center you can launch instances and resources in and ondemand nature.
17
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Elastic Capacity
One of the paradigms of Cloud computing is Elastic capacity.
Virtual environments afford the ability to operate in an elastic way. The nature of
Amazons cloud, having on-demand, uniform and accessible components, allows
you dynamically scale your computing resources to meet your business needs.
The major difference between this and traditional IT virtualization is the scale and
speed at which AWS Operates.
18
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Elastic Capacity
In Traditional IT you do capacity planning to predict IT spending. Customer
needs are variable and hard to predict. End result is that IT departments end up
provisioning hardware resources with very little accuracy and large lead times in
changing levels of resources.
19
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Elastic Capacity
1. [On and Off] Batch Processing (transcoding, genomic research, simulations)
2. [Fast Growth] New Product Launch
3. [Variable Peaks] Social networking site with peaks at lunch and in the evening
4. [Predictable Peaks] Backup Jobs, Ticket Sales Website
20
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Elastic Capacity
AWS component services empower you to control how and when you scale up or
down. This concept can be boiled down into Just-In-Time provisioning, which
essentially means that resources are there when you need them and not there
when you dont.
AWS offers on-demand provisioning and very fast boot times. Customers can
leverage these features to reduce costs and increase operating efficiency by not
running computing resources that are unused and by adding more resources
when they would be better utilized.
The first example of on/off is a use case that would be like a gene processing
job that would need to calculate a result set. While there is no work to be done
the system could be off saving money and resources.
Another great example of leveraging elasticity is when you are running a website
with variable peaks of utilization. In traditional IT, you have to estimate the level
of resources that you need to provision to be able to have a starting point. This
can translate over provisioning or under provisioning, which could lead to
customer dissatisfaction because of poor performance or worse unfulfilled
requests. Elasticity allows you to scale up to meet this demand and scale back
down to make the best use of your resources.
AWS Essentials Student Guide 2.5
21
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
22
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Animoto and Amazon EC2
In April of 2008, one of our customers, Animoto, saw a monster spike in traffic.
Animoto has a product that helps you create web videos with music and
graphics. They launched a Facebook app that lets people tell their friends when
theyve uploaded a video that includes that friend. You can see the spike in traffic
that this new app caused. The X-axis represents time elapsed and the Y-axis
represents the EC2 instances launched. Because they were using AWS,
Animoto didnt have to do a thingAWS took care of everything. Animoto used
EC2 or processing the videos with music, SQS for queuing pictures and S3
for storage.
Amazon Elastic Compute Cloud (EC2): is a web service that
provides resizable compute capacity in the cloud. It is designed to
make web-scale computing easier for developers.
23
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
24
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Security
Amazon Web Services (AWS) delivers a highly scalable cloud computing
platform with high availability and reliability, and the flexibility to enable
customers to build a wide range of applications. In order to provide end-to-end
security and end-to-end privacy, AWS builds services in accordance with security
best practices, provides appropriate security features in those services, and
documents how to use those features. AWS customers must use those features
and best practices to architect an appropriately secure application environment.
Enabling customers to ensure the confidentiality, integrity, and availability of their
data is of the utmost importance to AWS, as is maintaining trust and confidence.
AWS provides a wide range of information regarding its IT control environment to
customers through white papers, reports, certifications, and other third-party
attestations. This information assists customers in understanding the controls in
place relevant to the AWS services they use and how those controls have been
validated by independent auditors. This information also assists customers in
their efforts to account for and to validate that controls are operating effectively in
their extended IT environment.
25
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Quadrants of Security
Four quadrants of security built for Enterprise and Government standards.
26
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Physical Security
Physical (supplemental):
Must pass two-factor authentication at least twice for floor access
27
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
28
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
29
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
30
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
31
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
32
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
33
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
34
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
35
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
36
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
37
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
38
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
39
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
IAM Demo
1. How to create an IAM user
2. Assign the user a policy
3. Generate a password
4. Download the CSV
40
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Global Infrastructure
Amazon Web Services serves hundreds of thousands of customers in more than
190 countries. We are going to explain more in this section.
41
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Global Infrastructure
We are steadily expanding global infrastructure to help our customers achieve
lower latency and higher throughput, and to ensure that their data resides only in
the Region they specify. As our customers grow their businesses, AWS will
continue to provide infrastructure that meets their global requirements.
42
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
43
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Capacity Provisioning
AWS highly recommends provisioning your resources across multiple availability
zones. If you have more than one server, it costs nothing extra to run them
across more than one AZ and doing so will get you added redundancy. Should a
single AZ have a problem, all assets in your second AZ will be unaffected.
44
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
1. ___________________________________________________________
___________________________________________________________
___________________________________________________________
2. ___________________________________________________________
___________________________________________________________
___________________________________________________________
3. ___________________________________________________________
___________________________________________________________
___________________________________________________________
4. ___________________________________________________________
___________________________________________________________
___________________________________________________________
45
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWS Services
In this section we will begin covering specific services.
More Information
AWS products and services: http://aws.amazon.com/products/
46
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
47
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWS Platform
We will be covering the following deployment management and services in this
training:
CloudFormation
IAM
CloudWatch
EC2
S3
EBS
Glacier
VPC
RDS
48
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Storage Services
AWS offers many storage services and features that are a significant paradigm
shift from the traditional IT storage space. In traditional IT, most storage exists as
some form of hard drive space. In AWS, storage services have a varying mix of
durability, availability, and cost.
49
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
50
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
51
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
S3: Pricing
S3 pricing is based on capacity and bandwidth actually used. Since S3 is an
Internet scale service that runs natively across an entire region, it can handle
significant request throughput and bandwidth output. All bandwidth into S3 is
free, but we charge a rate on bandwidth out.
Most importantly, since S3 can handle any amount of data it is important to
distinguish that you only pay for the amount of space you use. Space is priced in
a prorated GB per month.
52
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
53
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
1. ___________________________________________________________
___________________________________________________________
___________________________________________________________
2. ___________________________________________________________
___________________________________________________________
___________________________________________________________
3. ___________________________________________________________
___________________________________________________________
___________________________________________________________
4. ___________________________________________________________
___________________________________________________________
___________________________________________________________
54
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Amazon Glacier
Amazon Glacier is an extremely low-cost storage service that provides secure
and durable storage for data archiving and backup. Amazon Glacier is optimized
for data that is infrequently accessed and for which retrieval times of several
hours are suitable. You store data in Amazon Glacier as archives. An archive can
represent a single file or you may choose to combine several files to be uploaded
as a single archive. Retrieving archives from Amazon Glacier requires the
initiation of a job. Jobs typically complete in 3 to 5 hours.
Amazon Glacier: is an extremely low-cost storage service that
provides secure and durable storage for data archiving and backup.
More Information
Glacier: http://aws.amazon.com/glacier/
55
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Glacier: Pricing
Glacier is designed with the expectation that retrievals are infrequent and
unusual, and data will be stored for extended periods of time. You can retrieve up
to 5% of your average monthly storage (pro-rated daily) for free each month. If
you choose to retrieve more than this amount of data in a month, you are
charged a retrieval fee starting at $0.01 per gigabyte. Learn more. In addition,
there is a pro-rated charge of $0.03 per gigabyte for items deleted prior to
90 days.
More Information
Glacier Pricing: http://aws.amazon.com/glacier/pricing/
56
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
57
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
58
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
EBS: Pricing
Volume storage for Standard volumes is charged by the amount you provision in
GB per month until you release it. Volume I/O for Standard volumes is charged
by the number of requests you make to your volume. Programs like IOSTAT can
be used to measure the exact I/O usage of your system at any time. However,
due to varying levels of caching of applications and operating systems, you may
see a lower number of I/O requests on your bill for Standard volumes than is
seen by your application unless you sync all of your I/Os to disk.
As with Standard volumes, volume storage for Provisioned IOPS volumes is
charged by the amount you provision in GB per month. With Provisioned IOPS
volumes, you are also charged by the amount you provision in IOPS (input/output
operations per second) X the percentage of days you provision for the month.
For example, if you provision a volume with 1000 IOPS, and keep this volume for
15 days in a 30 day month, then in the Virginia Region, you would be charged
$50 for the IOPS that you provision ($0.10 per provisioned IOPS-Month * 1000
IOPS Provisioned * 15 days/30).
Snapshot storage is based on the amount of space your data consumes in
Amazon S3. Because data is compressed before being saved to Amazon S3,
and Amazon EBS does not save empty blocks, it is likely that the size of a
AWS Essentials Student Guide 2.5
59
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
snapshot will be considerably less than the size of your volume. For the first
snapshot of a volume, Amazon EBS will save a full copy of your data to Amazon
S3. However for each incremental snapshot, only the part of your Amazon EBS
volume that has been changed will be saved to Amazon S3.
60
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
61
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
S3 & EBS
The most significant differences between S3 and EBS are nature in which they
are written two and accessed. EBS volumes are simply network attached hard
drives that can be written to or read from at a block level.
S3 is an object level storage medium. This means that you must write whole
objects at a time. If you change one small part of a file, you must still rewrite the
entire file in order to commit the change to S3. This can be very expensive if you
have frequent writes to the same object. S3 is optimized for write one read many
use cases.
Lastly, the other major difference is in how the services are priced. With S3 you
pay for what you use, and with EBS you pay for what you provision.
62
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Snapshots
Amazon EBS provides the ability to back up point-in-time snapshots of your data
to Amazon S3 for durable recovery. Amazon EBS snapshots are incremental
backups, meaning that only the blocks on the device that have changed since
your last snapshot will be saved. If you have a device with 100 GBs of data, but
only 5 GBs of data has changed since your last snapshot, only the 5 additional
GBs of snapshot data will be stored back to Amazon S3. Even though the
snapshots are saved incrementally, when you delete a snapshot, only the data
not needed for any other snapshot is removed. So regardless of which prior
snapshots have been deleted, all active snapshots will contain all the information
needed to restore the volume. In addition, the time to restore the volume is the
same for all snapshots, offering the restore time of full backups with the space
savings of incremental.
New volumes created from existing Amazon S3 snapshots load lazily in the
background. This means that once a volume is created from a snapshot, there is
no need to wait for all of the data to transfer from Amazon S3 to your Amazon
EBS volume before your attached instance can start accessing the volume and
all of its data. If your instance accesses a piece of data which hasnt yet been
loaded, the volume will immediately download the requested data from Amazon
S3, and then will continue loading the rest of the volumes data in
the background.
AWS Essentials Student Guide 2.5
63
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
S3 Exercise #1
1. Create a bucket in S3.
2. Add an object to the bucket.
3. View the object.
4. Move the object.
5. Delete the object and the bucket in S3.
64
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
More Information
There are step-by-step directions at the end of this guide.
65
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Computer Services
AWS Compute Services are at the core of all the products and services that
make up the Amazon Cloud.
66
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
67
68
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
69
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
EC2: Instances
There are a variety of billing constructs that you can use to make sure your
application runs in the most cost effective way possible.
AWS Free Usage Tier:
To help new AWS customers get started in the cloud
New AWS customers will be able to run a free Amazon EC2 Micro Instance and
a free Amazon RDS Micro Instance for a year, while also leveraging a free usage
tier for Amazon S3, Amazon Elastic Block Store, Amazon Elastic Load
Balancing, and AWS data transfer.
AWSs free usage tier can be used for anything you want to run in the cloud:
launch new applications, test existing applications in the cloud, or simply gain
hands-on experience with AWS
More Information
For more information on the AWS Free Usage Tier:
http://aws.amazon.com/free/
71
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Reserved Instances
Pay up-front fee to receive significant hourly discount
Cost / Predictability
Get priority compute capacity when needed
Use Cases: Applications with steady state or predictable usage; Applications that
require reserved capacity, including disaster recovery; Users are able to make
upfront payments to reduce overall computing
72
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
73
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Using EC2
1. Select a pre-configured, Amazon Machine Image (AMI) to get up and
running immediately. Or create an AMI containing your applications,
libraries, data, and associated configuration settings. Amazon EC2
provides templates known as Amazon Machine Images (AMIs) that
contains a software configuration (for example, an operating system, an
application server, and applications.) You use these templates to launch
an instance, which is a copy of the AMI running as a virtual server in
the cloud.
2. You can launch different types of instances from a single AMI. An instance
type essentially determines the hardware of the host computer used for
your instance. Each instance type offers different compute and memory
capabilities. Select an instance type based on the amount of memory and
computing power that you need for the application or software that you
plan to run on the instance. You can launch multiple instances from
an AMI.
3. Your instance keeps running until you stop or terminate it, or until it fails. If
an instance fails, you can launch a new one from the AMI.
4. Configure security and network access on your Amazon EC2 instance.
AWS Essentials Student Guide 2.5
74
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
5. Choose which instance type(s) you want, then start, terminate, and
monitor as many instances of your AMI as needed, using the web service
APIs or the variety of management tools provided.
6. Determine whether you want to run in multiple locations, utilize static IP
endpoints, or attach persistent block storage to your instances.
7. Pay only for the resources that you actually consume, like instance-hours
or data transfer.
75
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
76
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
EC2 Terminology
When launching an EC2 instance, you will initially begin by selecting an AMI and
an Instance type (optionally an availability zone). You will then have to select
various configuration options for your EC2 instance such as the networking
typology (EC2 Classic or VPC), what sort of storage devices you would like
attached (number and sizes of EBS volumes, ephemeral drives), and whether or
not you will be creating the storage devices from any S3 snapshots.
77
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
78
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
79
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
80
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
81
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
82
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
3 Services
All of these services work well individually, but together they become more
powerful and increase the control and flexibility our customers demand.
83
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
84
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Metadata Service
Q: How can I obtain information about myself from a running instance?
85
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
86
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
More Information
There are step-by-step directions at the end of this guide.
87
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
1. ___________________________________________________________
___________________________________________________________
___________________________________________________________
2. ___________________________________________________________
___________________________________________________________
___________________________________________________________
88
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Programmable Infrastructure
When you bring together all the tools and benefits of the Amazon Cloud, new
strategies, paradigms, and processes become possible that simply were not
possible with Traditional IT. One of the most significant among these is the idea
of programmable infrastructure.
89
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWS CloudFormation
AWS CloudFormation gives developers and systems administrators an easy way
to create a collection of related AWS resources and provision them in an orderly
and predictable fashion. The AWS CloudFormation samples package contains a
collection of templates that illustrate various usage cases. Stacks can be created
from the templates via the AWS Management Console, through the AWS
CloudFormation command line tools or via the AWS CloudFormation APIs.
(Demo CloudFormation in the AWS Management Console.)
More Information
Sample templates for CloudFormation:
http://aws.amazon.com/cloudformation/aws-cloudformationtemplates/
90
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
91
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
92
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
93
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
94
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Managed Services
AWS offers many services that shift burden of undifferentiated heavy lifting off
the customer by leveraging Amazon engineering and automation expertise.
For example, Amazon S3 is automatically run across every availability zone in
the region. We do that for you so that you dont have to worry about it. As a result
you get eleven nines of durability.
Although we have many managed services we are only going to dive into
RDS today.
95
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
96
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
97
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
98
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Resources
This section is a brief look at some of the resources available to you.
99
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
More Information
Service Documentation http://aws.amazon.com/documentation
The Articles and Tutorials section features in-depth documents
designed to give practical help to developers working with AWS.
They have been created by members of the AWS developer
community or the Amazon Team and give structured examples,
analysis, tips, tricks and guidelines based on real usage of AWS
services.
White Papers http://aws.amazon.com/whitepapers: There are
whitepapers authored by Amazon Team or AWS Community
features a comprehensive list of technical AWS whitepapers,
covering topics such as architecture, security and economics. This
page will be regularly updated with new and updated whitepapers.
Check back regularly or subscribe to the RSS feed for new content.
Solutions Case Studies http://aws.amazon.com/solutions/casestudies:The Sample Code & Libraries Catalog provides a listing of
code, SDKs, sample applications, and other tools available to for
use by the AWS developer community.
100
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
101
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
More Information
If you are a passionate AWS user and are interested in joining or
starting your own AWS User Group, see the list of existing groups
online or review the tips on starting your own group:
http://aws.amazon.com/usergroups/
102
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Summary
In summary here is what we covered in todays training.
103
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Next Steps
Your learning doesnt stop here. Continue your AWS education with additional
courses or start the path to being certified.
More Information
AWS Training: http://aws.amazon.com/aws-training/
104
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Thank You
This concludes our training. Please take a moment to fill out our evaluation form
so we can continue to enhance and revise out training to meet your needs. Your
feedback is important to us and we really appreciate your comments.
105
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
qwikLAB
For our exercises we will be using qwikLAB. qwikLAB will provide you an IAM
User and Login Profile with which to access the AWS Management Console.
1. Navigate to https://aws.qwiklab.com
2. Register a new qwikLAB account if you don't have an existing qwikLAB
account.
3. Login.
Note: If you forgot your password, retrieve it using the mechanism provided to
send a reset link to your email.
4. Navigate to the class title "AWS Essentials" by clicking on it's title under "My
Classes"
5. Click the button "Start Lab" next to the class lab title and number.
Note: Wait a moment after clicking "Start Lab" while the lab is starting and until
you see the running lab details.
6. Click the 'Download PEM' button and save it to your Downloads directory or
folder.
7. Select the contents of the 'Password' field and click the button "Enter AWS
Console".
8. Enter 'awsstudent' into 'User Name" and paste the password you copied into
'Password' and click on the button "Sign in using our secure server".
Congratulations! You now have access to an AWS account and are logged into
the AWS Management Console.
106
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
S3 Exercise #1
Getting Started with Amazon S3
1. Create a bucket in S3.
2. Add an object to the bucket.
3. View the object.
4. Move the object.
5. Delete the object and the bucket in S3.
Create a Bucket in S3
Every object in Amazon S3 is stored in a bucket. Before you can store data in
Amazon S3 you must create a bucket.
Note: You are not charged for creating a bucket; you are only charged for storing
objects in the bucket and for transferring objects in and out of the bucket.
1. Sign into the AWS Management Console and open the Amazon S3 console at
https://console.aws.amazon.com/s3.
AWS Essentials Student Guide 2.5
107
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
108
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
6. In the Amazon S3 console click the bucket you want to upload an object into
and then click
Upload in the
Objects and
Folders panel.
The Upload Select Files
wizard opens
(appearance may
differ slightly in
different
109
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
browsers):
7. If you want to upload a folder you must click Enable Enhanced Uploader for
the Java applet. After you download the Java applet, the Enable Enhanced
Uploader link disappears from the wizard. You only need to do this once per
console session and you can transfer entire folders.
Note: If you are behind any corporate firewall you will need to install your
corporate supported proxy client for the Java applet to work.
8. Click Add Files to select the file to upload from your computer. A file selection
dialog box opens.
If you enabled advanced uploader in step 2, you see a Java file selection
dialog box. If not, you see an operating system specific dialog box.
110
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
11. Click Start Upload. You can watch the progress of the upload using the
Transfer panel. The Transfer panel appears on the bottom of the screen as
soon as a you begin the upload.
If you want to toggle between hiding and viewing the Transfer panel, click
the Transfers button in the top right of the Objects and Folders panel.
After the object uploads successfully to Amazon S3, it appears in the
object listing.
Great Job: You've added a file to your bucket!!!
View an Object:
12. Now that you've added an object to a bucket, you can open and view it in a
browser. In the Amazon S3 console, right-click the objects you want to open.
13. Click Properties to browse the URL for
the item you added.
111
Move an Object:
Now that you've added an object to a bucket and viewed it, you might like to
move the object to a different bucket or folder.
14. In the Amazon S3 console, right-click the object you want to move.TipYou
can use the SHIFT and CRTL keys to select multiple objects and perform the
same action on them simultaneously.
15. Click Cut.
16. Navigate to the bucket (and folder) you
want to move the object to, and rightclick the folder or bucket you want to
move the object to.
17. Click Paste Into. Amazon S3 moves your files to the new location.
You can monitor the progress of the move on the Transfers panel. To hide
or show the Transfer panel, click the Transfers button at the top right of the
console page.
AWS Essentials Student Guide 2.5
112
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
You can use the SHIFT and CRTL keys to select multiple objects and perform
the same action on them simultaneously.
To delete a bucket, you must first delete all of the objects in it. If you haven't
deleted all of the objects in your bucket, do that now.
113
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Create an Elastic Load Balancer (ELB) using the console to front your
created EC2 instances
114
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Configure the ELB to front the web servers and distributed load
Explore Cloud Watch metrics for the ELB and also the instances behind
the ELB.
115
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Please ensure your region is set to US East (N. Virginia). In the upper right
corner of the page, you can choose the region using the selector in the
console shown below:
1.
2. Now click on Launch Instance.
3. Next select Launch Classic Wizard and click Continue. It is possible to start
your instances using the QuickLaunch wizard, but for the purposes of this lab
we want to see all the settings step by step, which is the way the Classic
Wizard captures instance information.
116
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
4. Now select the Basic 64-bit Amazon Linux AMI. This is a machine image
from which our instances will be created. In this case this is an Amazon
maintained Linux distribution with access to all the software repositories we
require to install software for this lab (such as Apache and PHP).
AWS Essentials Student Guide 2.5
117
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
5. We want to start more than one instance for this lab, so change the number of
instances to 2 and click Continue.
6. In the next screen we will use the User Data field to bootstrap our instance,
running a custom script to install the necessary packages (Apache and PHP)
and sample code (PHP scripts) that we will use in this lab. User data
provides a mechanism to pass information to the Amazon metadata service,
which instances request information from at launch time. One property of the
metadata service is that shell scripts passed in will be executed. In our case
we will bootstrap using the script shown in the box below.
7. To do this, copy & paste the following initialization script (you can use ShiftEnter to get to a new line in the text box) into the User Data field and click
Continue:
#!/bin/sh
curl -L http://bootstrapping-assets.s3.amazonaws.com/bootstrap-elb.sh | sh
8. As an FYI - the shell script at the url above downloads from S3 and then
executes the following command:
yum -y install httpd php
chkconfig httpd on
/etc/init.d/httpd start
AWS Essentials Student Guide 2.5
118
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
cd /var/www/html
wget http://bootstrappingassets.s3.amazonaws.com/examplefiles-elb.zip
unzip examplefiles-elb.zip
This downloads and installs various components, starts them, and installs our
sample application.
9. Next you can click continue on this screen, but you will notice that should
you require, you are able to edit the size of the root volume, plus add aditional
disks to the instance at boot time.
119
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
10. Give your new web servers a nice name like Essentials Lab Servers and
click Continue.
120
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
11. For this lab, we will reuse the key pair we created in the earlier lab. You also
have the option of creating a new key pair.
12. Create a security group, which will be your firewall rules. As we are building
out a Web server, we can name this Essentials Lab Web Tier, and shown
below you need to open ports 22 and 80. You need to add a rule for both
ports. This enables SSH and HTTP traffic.
121
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
13. Review your choices, and then click Launch. Your instances will now start.
Great Job!!!
Independently Connect to Each Web Server
14. First check the instances we started have finished their creation cycle by
monitoring them to make certain they are running. Youll notice that the
instances will be in a running state with 2/2 checks passed.
122
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
15. Now we can grab the public DNS entry allocated to each server so that we
can use this to hit the server in our web browser. Click on the first Web
Server, locate the servers DNS name, select and copy the servers name.
16. Paste the DNS name of each instance into another browser window or tab
and you should see something like the following images:
123
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWS Essentials Student Guide 2.5
124
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
17. This is the web page returned by the PHP script that was installed when the
instance when it started. It is a simple script that interrogates the metadata
service and returns the instance ID and where it is running. This will be
information that will help you see which instance you are hitting when we put
an Elastic Load Balancer in front of them.
Create an Elastic Load Balancer (ELB)
You now have two web servers, but you need a load balancer in front of these
servers to give your users a single location for accessing both servers and to
balance user requests across your simple web server farm.
18. In the EC2 console, click on the Load Balancers link, and click on Create
Load Balancer button.
19. For this lab we will be creating a simple HTTP load balancer, so give your
ELB a new name like LabELB, accept the default listener, and
click Continue.
AWS Essentials Student Guide 2.5
125
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
20. On the next screen change Ping Path to / (delete index.html) and change
the Healthy Threshold to 3. The ping path is the location on our web
servers the ELB will check is returning a healthy response to keep instances
in service or not. In our example / will return the default page our PHP
generated page seen earlier. The Healthy Threshold is the number of
successful checks the ELB expects to see in a row before bringing an
instance into service behind the ELB. We are lowering this to speed things up
for our lab.
126
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
21. Click continue to accept the advanced options. Note that these options can
be changed in the future, and configure how the ELB Health Check will be
performed including the health check protocol, port, and path as well as the
health check interval, timeout, and heath thresholds.
22. Select your Web Servers to add them to your ELB and click Continue.
127
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
23. Review your ELB settings and click Create (followed by Close).
24. AWS is now creating your ELB. It will take a couple of minutes to spin up
your load balancers, attach your web servers, and pass the health checks.
Click on your load balancer, select the Instances tab, and wait until the
instances status changes from Out of Service to In Service. Also note that
the overall Healthy? column turns from N0 to Yes. Your ELB is ready when
this happens.
128
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
25. Once your ELB is healthy, click on the Description tab, select and copy the
ELBs DNS name.
ELBs work across availability zones and they also scale elastically as
demand dictates. They therefore do not have IP addresses but rather a URL
to hit.
129
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
130
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
Great Job!!! You have now been able to create an Elastic Load Balancer backed
by multiple EC2 servers. In normal operation we would advise that these servers
be located in separate availability zones to enable your application to be fault
tolerant. You have also briefly seen how you can monitor the ELB metrics in
Cloud Watch.
131
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
132
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.
2013 Amazon Web Services, Inc. and its affiliates. All rights reserved.