2. Amazon
Web
Services
• a
suite
of
cloud
compu0ng
services
offered
by
Amazon
• highly
reliable,
scalable,
low-‐cost
infrastructure
pla>orm
in
the
cloud
• has
more
than
70
services
that
span
a
wide
range
including
compute,
storage,
networking,
database,
analy0cs,
applica0on
services,
deployment,
management,
mobile,
developer
tools
and
tools
for
the
Internet
of
things
• most
central
and
best-‐known
of
these
services
arguably
include
Amazon
Elas0c
Compute
Cloud,
also
known
as
EC2,
and
Amazon
Simple
Storage
Service,
also
known
as
S3
• data
center
loca0ons
in
the
U.S.,
Europe,
Brazil,
Singapore,
Japan,
and
Australia
AMAZON
WEB
SERVICES
3. Why
use
it?
• Low
Cost
– offers
low,
pay-‐as-‐you-‐go
pricing
with
no
up-‐front
expenses
or
long-‐term
commitments
– lets
you
consume
only
the
amount
of
resources
that
you
actually
need;
no
minimum
spend
needed
• Agility
and
Instant
Elas2city
– instead
of
wai0ng
weeks
or
months
for
hardware,
you
can
instantly
deploy
new
applica0ons,
instantly
scale
up
as
your
workload
grows,
and
instantly
scale
down
based
on
demand
– one
virtual
server
or
thousands,
whether
you
need
them
for
a
few
hours
or
24/7,
you
s0ll
only
pay
for
what
you
use
AMAZON
WEB
SERVICES
4. Why
use
it?
• Open
and
Flexible
– a
language
and
opera0ng
system
agnos0c
pla>orm
– choose
which
services
you
use,
one
or
several,
and
choose
how
you
use
them
• Secure
– a
secure,
durable
technology
pla>orm
with
industry-‐
recognized
cer0fica0ons
and
audits:
PCI
DSS
Level
1,
ISO
27001,
FISMA
Moderate,
FedRAMP,
HIPAA,
and
SOC
1
and
SOC
2
audit
reports
– services
and
data
centers
have
mul0ple
layers
of
opera0onal
and
physical
security
to
ensure
the
integrity
and
safety
of
data
AMAZON
WEB
SERVICES
5. Services
AMAZON
WEB
SERVICES
h [ p s : / /
www.expeditedssl.com/aws-‐
in-‐plain-‐english
6. Auto
Scaling
• helps
you
ensure
that
you
have
the
correct
number
of
EC2
instances
available
to
handle
the
load
for
your
applica0on
• create
collec0ons
of
EC2
instances,
called
Auto
Scaling
groups
• specify
the
minimum
number
of
instances
,
maximum,
and
the
desired
capacity
– minimum
-‐>
Auto
Scaling
ensures
that
your
group
never
goes
below
this
size
– maximum
-‐>
Auto
Scaling
ensures
that
your
group
never
goes
above
this
size
– desired
-‐>
Auto
Scaling
ensures
that
your
group
has
this
many
instances
at
any
given
0me
AMAZON
WEB
SERVICES
7. BeneGits
• Be?er
fault
tolerance
– can
detect
when
an
instance
is
unhealthy,
terminate
it,
and
launch
an
instance
to
replace
it
• Be?er
availability
– can
help
you
ensure
that
your
applica0on
always
has
the
right
amount
of
capacity
to
handle
the
current
traffic
demands
• Be?er
cost
management
– can
dynamically
increase
and
decrease
capacity
as
needed.
Because
you
pay
for
the
EC2
instances
you
use,
you
save
money
by
launching
instances
when
they
are
actually
needed
and
termina0ng
them
when
they
aren't
needed
AMAZON
WEB
SERVICES
8. Services
Needed
•
EC2
– provides
scalable
compu0ng
capacity
in
the
Amazon
Web
Services
(AWS)
cloud
– you
can
launch
virtual
servers
as
you
need,
configure
security
and
networking,
and
manage
storage
ELB
– automa0cally
distributes
incoming
applica0on
traffic
across
mul0ple
Amazon
EC2
instances
in
the
cloud
Launch
ConfiguraBon
– template
for
its
EC2
instances
– in
here
you
can
specify
informa0on
such
as
the
AMI
ID,
instance
type,
key
pair,
security
groups
AMAZON
WEB
SERVICES
9. Services
Needed
Autoscale
Group
– instances
are
organized
into
groups
so
that
they
can
be
treated
as
a
logical
unit
for
the
purposes
of
scaling
and
management
Security
Groups
– acts
as
a
virtual
firewall
that
controls
the
traffic
for
one
or
more
instances
• S3
– storage
for
the
Internet
• CloudWatch
– monitoring
service
for
resources,
allows
you
to
set
alarms
and
triggers
that
can
be
used
by
other
AWS
services
AMAZON
WEB
SERVICES
10. How
to
autoscale
using
Amazon
Web
Services?
Incoming
requests CloudWatch triggers
alarm Autoscale
Group scales
up EC2
instances uses Launch
Configuration
Base
AMI
Security
Group
Elastic
Load
Balancer
AMAZON
WEB
SERVICES
11. How
to
deploy
application?
User
Data
from
Launch
Configuration
sets
up
the
env
properties
systemStartup.sh
set
up
the
env
using
properties
update.sh
delegates
install
to
env
specific
install
script
update<Env>.sh
YUI
RESET,
FONTS,
GRIDS
12. Steps
1) Set
up
the
Elas0c
Load
Balancer
2) Set
up
the
Security
Group
-‐
Open
the
necessary
ports
on
the
necessary
protocols
3) Create
a
Base
AMI
-‐
Install
the
necessary
sodware
and
services
S3cmd,
NGinx,
etc.
4) Create
a
Launch
Configura0on
-‐
Add
the
configura0on
script
in
the
User
Data
5) Create
Autoscale
Group
6) Create
Cloudwatch
alarms
AMAZON
WEB
SERVICES
One of the most popular features of AWS is the Autoscaling
Autoscaling is a service that helps you ensure that you have the correct number of EC2 instances available to handle the load for your application
Makes sure that you have the correct amount of computing resource depending on your real time load
Min and max are the hard limits, the range in which the number of your instances can grow or shrink to
Desired is the number of instances at any given time, and is governed by the auto scaling rules
For the set up of Autoscaling, we will use as a guide the ikemu set up