aws summit berlin 2013 - your first week with ec2
TRANSCRIPT
![Page 1: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/1.jpg)
Ryan Shuttleworth, Technical Evangelist
Your first week with EC2(and other AWS things…)
![Page 2: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/2.jpg)
things you should know/think about up front
some best practices for getting started
essential technologies to dive into and get familiar with
architectural principles you should immerse yourself in
What are we going to cover?Your first 5 days with EC2…
![Page 3: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/3.jpg)
hear a ‘looking back at our first year’ customer storycompressed into 5 days
What are we going to cover?Your first 5 days with EC2…
![Page 4: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/4.jpg)
organise your house1DAY
![Page 5: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/5.jpg)
Users & Roles
Start as you mean to go on
Secure your console with IAM roles
A little time spent now will save headaches later
![Page 6: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/6.jpg)
Users & Roles
Start as you mean to go on
Secure your console with IAM roles
A little time spent now will save headaches later
Accounts & Billing
Create a structure that makes sense
Dev & Test accounts vs production
Consolidated billing
Resource tagging
![Page 8: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/8.jpg)
Division [email protected]
User2Dev2Admin2
IAM
Master [email protected]
consolidated billing information
Billing
![Page 9: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/9.jpg)
Division [email protected]
User2Dev2Admin2
IAM
Tags:Own=DivProj=P
Tags:Own=DivProj=Q
Tags:Own=DivProj=R
Master [email protected]
consolidated billing information
Billing
Tags: (key-value)
e.g Own=DivProj=R
![Page 10: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/10.jpg)
Operating Co. [email protected]
User1Dev1Admin1
IAM
Tags:Own=OpCoProj=A
Tags:Own=OpCoProj=B
Tags:Own=OpCoProj=C
Division [email protected]
User2Dev2Admin2
IAM
Tags:Own=DivProj=P
Tags:Own=DivProj=Q
Tags:Own=DivProj=R
Business Unit [email protected]
User3Dev3Admin3
IAM
Tags:Own=BusCProj=X
Tags:Own=BusCProj=Y
Tags:Own=BusCProj=Z
Master [email protected]
consolidated billing information
Billing
![Page 11: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/11.jpg)
Operating Co. [email protected]
User1Dev1Admin1
IAM
Tags:Own=OpCoProj=A
Tags:Own=OpCoProj=B
Tags:Own=OpCoProj=C
Division [email protected]
User2Dev2Admin2
IAM
Tags:Own=DivProj=P
Tags:Own=DivProj=Q
Tags:Own=DivProj=R
Business Unit [email protected]
User3Dev3Admin3
IAM
Tags:Own=BusCProj=X
Tags:Own=BusCProj=Y
Tags:Own=BusCProj=Z
Master [email protected]
Alert:
Reached $1,250consolidated billing information
Billing
Alert:
Reached $3,000Alert:
Reached $500
![Page 12: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/12.jpg)
Master [email protected]
consolidated billing information
Programmatic billing access
S3 CSV
Billing
Operating Co. [email protected]
User1Dev1Admin1
IAM
Tags:Own=OpCoProj=A
Tags:Own=OpCoProj=B
Tags:Own=OpCoProj=C
Division [email protected]
User2Dev2Admin2
IAM
Tags:Own=DivProj=P
Tags:Own=DivProj=Q
Tags:Own=DivProj=R
Business Unit [email protected]
User3Dev3Admin3
IAM
Tags:Own=BusCProj=X
Tags:Own=BusCProj=Y
Tags:Own=BusCProj=Z
![Page 13: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/13.jpg)
Operating Co. [email protected]
User1Dev1Admin1
IAM
Tags:Own=OpCoProj=A
Tags:Own=OpCoProj=B
Tags:Own=OpCoProj=C
Division [email protected]
User2Dev2Admin2
IAM
Tags:Own=DivProj=P
Tags:Own=DivProj=Q
Tags:Own=DivProj=R
Business Unit [email protected]
User3Dev3Admin3
IAM
Tags:Own=BusCProj=X
Tags:Own=BusCProj=Y
Tags:Own=BusCProj=Z
Master [email protected]
consolidated billing information
Programmatic billing access
S3 CSV
Billing
![Page 14: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/14.jpg)
Secrets & Keys
![Page 15: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/15.jpg)
Secrets & Keys
Your front door keys
![Page 16: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/16.jpg)
Secrets & Keys
Your front door keys
Control access to your instances
Key management strategy
![Page 17: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/17.jpg)
Secrets & Keys
Control access to your APIs
Your front door keys
Use IAM Roles to distribute to instances
Control access to your instances
Key management strategy
![Page 18: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/18.jpg)
learn the basics2DAY
![Page 19: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/19.jpg)
What is EC2?
Elastic capacity Flexible
Complete control
Reliable
Inexpensive
Secure
![Page 20: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/20.jpg)
Disposable compute
![Page 21: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/21.jpg)
Instance
![Page 22: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/22.jpg)
Instance Unit of scale
Unit of resilience
Unit of control
![Page 23: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/23.jpg)
Instance Unit of scale
Unit of resilience
Unit of control
Your stack
![Page 24: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/24.jpg)
Instance
Instance
Instance
Instance
Unit of scale
Unit of resilience
Unit of control
Scal
e ou
t
![Page 25: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/25.jpg)
Instance
Instance
Instance
Instance
Unit of scale
Unit of resilience
Unit of control
![Page 26: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/26.jpg)
Instance
Instance
Instance
Unit of scale
Unit of resilience
Unit of control
![Page 27: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/27.jpg)
Instance
Instance
Instance
Unit of scale
Unit of resilience
Unit of control
Instance
![Page 28: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/28.jpg)
Think differentlyCompute is transient
![Page 29: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/29.jpg)
Programmatic resources
Treat your datacentre resources like code
![Page 30: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/30.jpg)
Distributed systems
Programmatic resources
Design for decoupled systems up front
Treat your datacentre resources like code
![Page 31: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/31.jpg)
Late binding
Distributed systems
Programmatic resources
Decide what it will run on at point of deployment
Design for decoupled systems up front
Treat your datacentre resources like code
![Page 32: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/32.jpg)
go wild with tools3DAY
![Page 33: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/33.jpg)
Compute
Storage
Security Scaling
Database
NetworkingMonitoring
Messaging
Workflow
DNSLoad Balancing
BackupCDN
APIAccess everything
via CLI, API or Console
Achieve the highest levels of automation
sophistication with ease
Everything is programmable
![Page 34: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/34.jpg)
CLI Tools
ec2-run-instances ami-54cf5c3d--instance-count 2--group webservers--key mykey--instance-type m1.small
$>
![Page 35: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/35.jpg)
>>> import boto.ec2>>> conn = boto.ec2.connect_to_region("us-east-1")>>> conn.run_instances( 'ami-54cf5c3d', key_name='mykey', instance_type='m1.small', security_groups=['webservers'])
Python boto
![Page 36: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/36.jpg)
Resources created programmatically
![Page 37: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/37.jpg)
Resources created programmaticallyConfigure automatically
![Page 38: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/38.jpg)
Bake an AMI
Start an instance
Configure the instance
Create an AMI from your instance
Start new ones from the AMI
Bootstrapping
![Page 39: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/39.jpg)
Bake an AMI
Start an instance
Configure the instance
Create an AMI from your instance
Start new ones from the AMI
Bootstrapping
ec2-run-instances<your ami-
id>
$>
![Page 40: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/40.jpg)
Bake an AMI Configure dynamically
Start an instance
Configure the instance
Create an AMI from your instance
Start new ones from the AMI
Bootstrapping
Launch an instance
Use metadata service and cloud-init to
perform actions on instance when it
launches
vs
Bootstrapping
![Page 41: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/41.jpg)
Bake an AMI
Build your base images and setup
custom initialisation scripts
Maintain your ‘golden’ base
Bootstrapping
Use bootstrapping to pass custom
information in and perform post launch
tasks like pulling code from SVN
+
Bootstrapping
Configure dynamically
![Page 42: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/42.jpg)
Bake an AMI
Bootstrapping
Time consuming configuration (e.g startup time)
Static configurations(e.g less change management)
Bootstrapping
Configure dynamically
![Page 43: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/43.jpg)
Bake an AMI
Bootstrapping
Continuous deployment(e.g latest code)
Environment specific(e.g dev-test-prod)
Bootstrapping
Configure dynamically
![Page 44: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/44.jpg)
Goal is bring an instance up in a useful state
The balance will vary depending upon your application
![Page 45: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/45.jpg)
Instance request
User data
User-data
![Page 46: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/46.jpg)
Instance request
User data
Meta-data service
User-data
![Page 47: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/47.jpg)
Instance request
User data
Instance
Meta-data service
User-data
![Page 48: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/48.jpg)
#!/bin/shyum -y install httpd php mysql php-mysqlchkconfig httpd on/etc/init.d/httpd start
Shell script in user-data will be executed on launch:
Tip
![Page 49: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/49.jpg)
Tip
Amazon Windows EC2Config Service executes user-data on launch:<script>dir > c:\test.log</script>
<powershell>any command that you can run</powershell>
<powershell>Read-S3Object -BucketName myS3Bucket -Key myFolder/myFile.zip -File c:\destinationFile.zip
</powershell>
AWS Powershell Tools
![Page 50: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/50.jpg)
Why do this?
AutomationLess fingers, less mistakes
AvailabilityDrive higher
availability with self-healing
SecurityInstances
locked down by default
FlexibleShell,
Powershell, CloudFormation,Chef, Puppet,
OpsWorks
ScaleManage large scale
deployments and drive autoscaling
EfficiencyAudit and manage your estate with less time & effort
![Page 51: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/51.jpg)
try something new4DAY
![Page 52: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/52.jpg)
UnconstrainedEC2 resources
![Page 53: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/53.jpg)
UnconstrainedComplimentary services
![Page 54: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/54.jpg)
My little instance(created programmatically)
![Page 55: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/55.jpg)
A bit of S3 code(pulled down automatically from S3)
>>> from boto.s3.key import Key>>> k = Key(bucket)>>> k.key = 'foobar'>>> k.set_contents_from_string('This is a test of S3')
My little instance(created programmatically)
![Page 56: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/56.jpg)
A bit of S3 code(installed automatically)
>>> from boto.s3.key import Key>>> k = Key(bucket)>>> k.key = 'foobar'>>> k.set_contents_from_string('This is a test of S3')
My little instance(created programmatically)
UNLIMITED storage from my little instance
![Page 57: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/57.jpg)
Services instead of softwareRemoves undifferentiated heavy lifting
![Page 58: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/58.jpg)
Services instead of softwareRemoves undifferentiated heavy lifting
S3 for object storage
SQS for queues
RDS for databases
CloudWatch for monitoring
![Page 59: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/59.jpg)
put something together5DAY
![Page 60: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/60.jpg)
1. Use multiple availability zones
![Page 61: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/61.jpg)
2. Use RDS with replicas and slaves
![Page 62: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/62.jpg)
3. Use auto-scaling groups
![Page 63: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/63.jpg)
4. Use Elastic Load Balancing
![Page 64: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/64.jpg)
5. Use Route53 to host DNS zones
![Page 65: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/65.jpg)
Find out more about model architectures in:
Building Web Scale Applications session
![Page 66: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/66.jpg)
Get set up right from the start
Understand programmable compute
Use the tools and have a play
Explore the services beyond EC2
Build something! (you can always throw it away)
SummaryLessons learned…
aws.typepad.com
![Page 67: AWS Summit Berlin 2013 - Your first week with EC2](https://reader033.vdocuments.mx/reader033/viewer/2022042821/55d5159cbb61eb7c6b8b4652/html5/thumbnails/67.jpg)
Thank you