Amazon Web Services introduction

38
Amazon Web Services Overview and introduction

description

 

Transcript of Amazon Web Services introduction

Page 1: Amazon Web Services introduction

Amazon Web Services

Overview and introduction

Page 2: Amazon Web Services introduction

About myself

• Head of Development Estonia @ Insparx GmbH• 24 years programming, 10 years leading teams• Startup experience – running on AWS / Azure clouds

• Linked - http://ee.linkedin.com/in/konstantinroot/ • Twitter - @konstantin_root

Page 3: Amazon Web Services introduction

Overview

• What is AWS?

• What people usually mean when talking about AWS and why they are wrong

• Difference between AWS and VPS?• Mix AWS with other providers

Page 4: Amazon Web Services introduction

When to use (or not)

• When to use?– Startups– For quick tests / experiments

• Requires deployment automation!

– Your business requires compliance with secure regulations from specific industry

• When not to use?– You have predictable load and want to have best

$$$/resources

Page 5: Amazon Web Services introduction

Competition

• Azure• Rackspace• VPS – Linode, DigitalOcean, Softlayer, Hertzner, etc.

Page 6: Amazon Web Services introduction

Understanding AWS locations

• 8 regions, 44 edge locations

Page 7: Amazon Web Services introduction

Availability zones

• What are they?• Why they are

required?• How they are

connected?

Page 8: Amazon Web Services introduction

Services availability

• Availability zone could go down– Usually related to EBS, ELB, EC2

problems

• Whole region could go down• If you require 24/7 with tight SLAs

– use multiple regions

Page 9: Amazon Web Services introduction

Pricing structure

• Free tier and Startup plan• Each region have slightly different prices• US East is biggest, oldest and cheapest

region• Expect to pay for every

transaction/resource usage– Good predictability of expenses– Better service vs “all you can eat” providers

Page 10: Amazon Web Services introduction

AWS overview

• Compute & Networking – EC2, EMR (Hadoop), Elastic Load Balancer & Auto Scaling, VPC & Direct Connect, Route 53

• Storage & CDN – EBS, S3, Glacier, CloudFront• Databases – RDS (MySQL, Oracle, SQL Server), DynamoDB,

SimpleDB, Redshift, ElastiCache (Memcached, Redis)• Application services – SQS (queue), SES (email), SNS (push

notifications), FPS (payment), CloudSearch, SWF (workflow), Elastic Transcoder

• Management & Deployment – IAM, CloudWatch, Elastic Beanstalk, OpsWorks (Chef), CloudFormation, CloudHSM (Hardware Security Module)

Page 11: Amazon Web Services introduction

Services control

• Web Console• CLI– Azure minute of shame

• API• 3rd party services and

products

Page 12: Amazon Web Services introduction

Payment

• Estonia credit cards are OK

• Expenses report• Understand and use free

tier

Page 13: Amazon Web Services introduction

Support

• Forums - free– Azure minute of shame ;)

• Emails• Commercial support

Page 14: Amazon Web Services introduction

Where to start?

Page 15: Amazon Web Services introduction

Understand IAM

• Access to AWS resources• Root account vs user vs services• Groups, Users, Roles• What is role?– Permissions to access resource API calls

• 2 way authorization– Free application for mobile phones

@Live demo

Page 16: Amazon Web Services introduction

Access from application

• Default option – use Access Key ID / Secret Access Key combo

• EC2 IAM Role– Avoid hardcoding credentials into

application configuration– Retrieve temporary token

programmatically

Page 17: Amazon Web Services introduction

Amazon Elastic Compute Cloud

Page 18: Amazon Web Services introduction

What is EC2

• Xen virtualization• Limited resources per server– Elastic Compute Unit (ECU) ~=

1-1.2Ghz 2007 Opteron/Xeon

• You share resources with others on server– Noisy neighborhood problem– Local disk usage problems

Page 19: Amazon Web Services introduction

Instance types

• Details @ http://aws.amazon.com/ec2/instance-types/

• Micro instance – tricky one• EBS traffic counts in network limit

– that’s what EBS optimized instances for

Page 20: Amazon Web Services introduction

Purchase options

• Understanding On-Demand vs Reserved vs Spot

• Different Reserved tiers• Reserved instances marketplace and ability to

change your purchases• What is Spot instance and when to use it?– Protect against price fluctuation– Don’t forget to bid on higher end instances with

same price

Page 21: Amazon Web Services introduction

Security groups

• Understanding them• Best practices– Azure minute of

shame ;)

@Live demo

Page 22: Amazon Web Services introduction

EC2 image options

• AWS Marketplace• All major OS are presented by vendors– Ubuntu selector -

http://cloud-images.ubuntu.com/locator/ec2/

• Create your own• EBS vs S3 for AMI

@Live demo

Page 23: Amazon Web Services introduction

Storage options

• Local storage vs EBS• Local storage– SATA or SSD– No persistence on reboot

• EBS ~100 IOPS– Provisioned IOPS up to 4000 (16KB

block)– You could RAID EBS volumes– Choose EBS optimized instances when

required

Page 24: Amazon Web Services introduction

Permanent IP address

• Elastic IP• Allocate and (re)assign

to servers• Low cost ~$3.6• Default limit is 5

Page 25: Amazon Web Services introduction

Elastic scaling• When to use it?• You could use your own solution• Azure year of shame

Page 26: Amazon Web Services introduction

When not to use EC2

• Have CPU intensive tasks not tied closely with AWS? EC2 is bad $$$ investment vs other providers

• High memory instances are expensive• Email server hosting

Page 27: Amazon Web Services introduction

File storage options:EBS vs S3 vs Glacier

Page 28: Amazon Web Services introduction

EBS

• Speed is limited, but could increase it with $$$• Pay for everything

– Pay for provisioned storage: 1GB = $0.10 ($0.125 for provisioned IOPS)– 1 million I/O requests = $0.10

• Could create on the fly snapshots to S3– First one is full then incremental ones

• Part of recent outages was related to it

Page 29: Amazon Web Services introduction

S3

• Unlimited amount of objects• High durability/availability• High speed within region – 5-15MB/sec• Pay per operation and size only

– Modifications: 1K requests = $0.005– Read: 1K requests = $0.004– Used storage: 1GB = $0.095– 1GB traffic OUT = $0.12 (region traffic free)

• No folders (they are emulated)• 3rd party tool for accessing data - CloudBerry

Page 30: Amazon Web Services introduction

Glacier

• Use case – archive lots of data, but read them rarely

• Integration with S3 – move files to Glacier automatically

• Pricing– Storage: 1GB = $0.01– Upload / retrieve: 1k operations = $0.050– Traffic: 1GB OUT = $0.120 (region traffic free)– Read 5% of data free then pay for it

Page 31: Amazon Web Services introduction

Other services

Page 32: Amazon Web Services introduction

Database options

• Relational databases – MySQL, Oracle, SQL Server– No PostgreSQL

• NoSQL– DynamoDB – fast and great, but $$$– SimpleDB – don’t use unless you

understand perfectly your reasons

• Caching– Memcached– Redis

• Redshift – warehousing solution for TB/PB scale

Page 33: Amazon Web Services introduction

DynamoDB in details• Great product with some limitations• High durability and quick operations (<10ms)

– http://www.dynaspeed.net/ • Unique pricing:

– Pay per provisioned capacity (1 unit = 1KB)• 10 write units = $0.0065/hour• 50 read units = $0.0065/hour

– Indexed storage after 100MB: $0.25/GB– Traffic OUT: $0.12/GB (region traffic free)– Great saving if purchased upfront in 5k read/write units– Free tier – 5 writes, 10 reads

Page 34: Amazon Web Services introduction

Elastic Load Balancer

• Integrates with EC2 health checks• DNS failover integration with Route 53• Auto Scaling integration• SSL termination, session stickiness• $0.025/hour, $0.008/GB for traffic• Not as flexible as HAProxy, but OK in

most cases

Page 35: Amazon Web Services introduction

CloudFront

• AWS version of CDN• Many edge locations in all regions• For static files uses S3 folder as the source

– Could invalidate static objects with some delay

• Could cache dynamic content (think of Varnish)

• Low pricing – you pay only for actual usage

Page 36: Amazon Web Services introduction

Message queue

• Limitations:– Max 256KB size of message– Long poll, but with 20sec limit – Limited routing options

• Expensive for large amounts:– 1 million requests = $0.50– 1 request unit = 64KB– Traffic $0.12/GB

• Alternatives:– Hosted RabbitMQ, ActiveMQ, Redis, ZeroMQ– 3rd party solution – IronMQ (http://www.iron.io/mq)

Page 37: Amazon Web Services introduction

Route 53

• DNS service• Scalable and with good API• Advanced capabilities– DNS failover using health checks– Zone apex mapping to ELB– Weighted Round Robin– Latency based routing

Page 38: Amazon Web Services introduction

Blogs to follow

AWS team http://aws.typepad.com/aws/Azure team http://weblogs.asp.net/scottgu/default.aspx