Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to amazon web services for developers

744 views

Published on

Introduction to Amazon Web Services for developers
About presenter
Roman Gomolko with 11 years of experience in development including 4 years of day-to-day work with Amazon Web Services.
Disclaimer
Cloud-hosting is buzz-word for a while and in my talk I would like to give an introduction to Amazon Web Services (AWS).
We will talk about basic building blocks of AWS like EC2, ELB, ASG, S3, CloudFront, RDS, IAM, VPC and other scary or funny abbreviations.
Then we will discuss how to migrate existing applications to AWS. This topic includes:
• how to design infrastructure and services to use when migrating
• how to choose proper instance types
• how to estimate infrastructure cost
• how it will affect performance of application migrated
Then we will make an overview of services provided by AWS and possible apply in your current of future applications:
• SQS
• DynamoDB
• Kinesis
• CloudSearch
• CodeDeploy
• CloudFormation
And if we survive we will talk a little how to design Cloud applications. That’s mainly about general principles.
My talk mostly targeted towards decision makers and decisions pushers of small and medium size companies which are consider “going cloud” or already moving into this direction. Everyone interested in gaining knowledge in these areas are welcomed as well.
We will spend around 2–3 hours together and you will be able to pitch-in any questions until we totally goes away from original plan.

Published in: Technology
  • Be the first to comment

Introduction to amazon web services for developers

  1. 1. Introduction to Amazon Web Services for developers Roman Gomolko roman@userreport.com July 2015 Ciklum Speakers Corner
  2. 2. Let’s get acquired
  3. 3. UserReport ● Developing products that allow to learn the audience ● Started using AWS more than 5 years ago ● Fully migrated to AWS more than 1.5 years ago ● Processing 3 billions requests monthly ● Generating reports based on 8 billions of requests with batched reports ● Online reports on 300 millions of records ● Used ~50% of services provided by AWS ● Totally happy regarding using AWS
  4. 4. Cloud Computing Cloud computing is a model for enabling access to a shared pool of configurable computing resources
  5. 5. Typical Cloud benefits ● Pay for what you are using ● High scalability - retrieve as many resources as you need ● High availability ● Gartner's Hype cycle – cloud computing has reached a maturity
  6. 6. Cloud models ● IaaS Infrastructure like physical (rarely) or virtual servers, storage, networking, load balancers, IP addresses allocation etc ● PaaS Hosted databases, pre-configured web-servers that can run your application, platforms that can run your code ● aPaaS Tools and services that automates and facilitates utilizing Cloud Services. Providing tools for development, deployment, monitoring etc ● SaaS Gmail, MailChimp, Highrise, Google photo, Jira Cloud etc
  7. 7. Amazon Web Services IaaS PaaS aPaaS SaaS
  8. 8. Naming convention ● Everything is Elastic ● Everything is Simple ● DRY Elastic Compute Cloud = ECC = EC2 Simple Storage Service = SSS = S3 Elastic Load Balancer = ELB AutoScale Group = ASG ...
  9. 9. AWS is regional
  10. 10. AWS is regional ● Almost all services are region specific ● Pricing of services depends on region ● Not all services are available in all regions ● New services are launching in N. Virginia (US East 1) first http://aws.amazon.com/about-aws/global-infrastructure/regional-product- services/
  11. 11. Regions are not solid ● Splitted into Availability Zones (AZ) ● AZs have independent power supply ● Cross-AZ network speed is blazing fast ● Some services belong to AZ, some - not
  12. 12. Iaas basics ● EC2 Virtual computers managed by XEN running on Intel CPUs ● EBS SSD or magnetic drives dynamically attached to EC2 instances with configurable size (up to 16Tb) with configurable IOPs ● ELB Load balancing before your EC2 instances ● VPC Creating network and group your instances/services into “Private Cloud”
  13. 13. PaaS basics ● CloudFront CDN for downloading and streaming ● S3 Infinite storage for objects (files) with security and HTTP access ● RDS Hosted databases like MySQL, MS SQL, PostgreSQL, Oracle, Aurora with licenses included ● DynamoDB NoSQL database designed for high performance and availability
  14. 14. PaaS basics ● Route53 Fully managed and DNS and domain registration ● ElastiCache Fully managed hosted memcache and Redis ● SQS Queue designed for high availability and millions of messages
  15. 15. Some more PaaS ● CloudSearch Search engine for free-text search among millions of documents ● EMR Fully managed Elastic MapReduce and Spark clusters ● Elastic Transcoder Encoding media-files in different formats with different quality ● … and more
  16. 16. aPaaS ● CloudWatch Monitoring of your infrastructure and applications ● Elastic Beanstalk Automated web-applications and workers hosting ● CloudFormation Manage your cloud services in one place with help of text file ● CodeDeploy Automates deployment of your application ● OpsWorks Chef cooked by AWS to automate provisioning and deployment
  17. 17. SaaS basics ● SES Sending e-mails from Cloud ● SNS Push notifications ● WorkMail Hosted exchange server for organizations ● WorkSpaces Virtual office became reality
  18. 18. Migration of existing web-application to AWS DBWebServer
  19. 19. Migration to Cloud ● One bite at a time - migration to Cloud itself is a big deal ● Cloud may have similar services to what you are using in your app. Similar is not the same. ● Usually you have application which works somehow try to keep your structure unchanged ● Less efforts, faster migration
  20. 20. Hosting your web-application 1. Create EC2 2. Connect to it 3. Configure it 4. Deploy code to it 5. Access website
  21. 21. Creating EC2. Choose operating system image
  22. 22. Creating EC2. Choose instance type
  23. 23. Creating EC2. Instance details
  24. 24. Creating EC2. Storage
  25. 25. Creating EC2. Tags
  26. 26. Creating EC2. Security group
  27. 27. Creating EC2. Review. Almost done
  28. 28. Creating EC2. Selecting key-pair
  29. 29. Connecting to your instance. Wait until launched
  30. 30. Connecting to your Linux instance Linux / Mac OS X ssh -i "<keypair>.pem" ec2-user@<instance IP> Windows ● convert .pem to .ppk using Putty KeyGen ● connect to instance using Putty ● refer help for more details
  31. 31. Connecting to your Windows instance ● Wait 4-20 minutes after starting instance ● Retrieve password using you keypair ● Use Remote Desktop to connect to your instance. Use Administrator as name ● Password will expire, better create permanent user
  32. 32. Configuring your instance as you like sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install libapache2-mod-php5 sudo /etc/init.d/apache2 restart import-module servermanager add-windowsfeature Web-Server, Web-WebServer, Web-Security
  33. 33. Deploy your application
  34. 34. Accessing your web-application ● Your public IP is not static. It will be changed after reboot ● You can request IP address and attach it to instance dynamically ● In future you can assign this IP to another instance ● Put this IP to your DNS or write to host file
  35. 35. Database. Let’s try RDS
  36. 36. Multi-AZ deployments for reliability multiply hosting cost by number of AZ zones
  37. 37. Configure your instance and DB master credentials
  38. 38. Secure your database
  39. 39. Take advantage of managed solutions
  40. 40. Wait. Cloud? I need more redundancy 1. Create EC2 2. Connect to it 3. Configure it 4. Stop it 5. Create AMI 6. Launch required number of instances using this AMI 7. Deploy code to them 8. Access website
  41. 41. Launching from you AMI
  42. 42. Horizontal scaling of application checklist ● Data-less ● Stateless ● Shared session ● Same encryption keys
  43. 43. Distribute traffic between instances ● DNS round-robin ● Load balancer
  44. 44. Elastic Load Balancer ● Accept incoming traffic and distribute among instances ● Monitors instance availability ● Can accept HTTPS traffic and map to HTTP endpoint of web-server ● Allows to not expose web-servers to worldwide ● Allows Connection Draining ● Provides useful metrics like latency, requests per minute, count of 2XX, 4XX and 5XX response codes
  45. 45. I’ve become popular. Need to scale Instance roles: ● Web/front-end ● Worker/back-end ● DB Scaling strategies: ● Vertical scaling ● Horizontal scaling
  46. 46. Vertical scaling ● Good if your bottleneck is CPU, RAM or disk ● Can be done with downtime or without it
  47. 47. Vertical scaling of EC2. ● Simple - downtime ○ Stop ○ Change instance type ○ Start ● Complex - no downtime ○ Launch new instance with required instance type ○ Switch traffic from old instance to new one
  48. 48. Vertical scaling of RDS ● Can be done without downtime in case of Multi-AZ deployment ● Not that fast in any way
  49. 49. Where is fun stuff?
  50. 50. I want to be Elastic
  51. 51. AutoScale groups Launch configuration - how your instance will look like AutoScale group - control how many instances will be in your group
  52. 52. Launch Configuration - customize instance bootstrap
  53. 53. AutoScale group
  54. 54. AutoScale Group - scaling policies
  55. 55. Finally ● AWS can scale our application automatically looking on CPU load ● AWS can scale-down instances when load decreased
  56. 56. Small catch-up ● We know what is EC2 and how to deploy application first time ● We know how to horizontally scale up and down your application ● It looks pretty cumbersome ● We don’t know where we should store users’ files ● We don’t know how to improve website performance ● We don’t know how to update your application
  57. 57. Pricing http://calculator.s3.amazonaws.com/index.html
  58. 58. Bad reasons to migrate ● Migrating everything by just virtualizing existing stuff and expecting savings ● Expecting magical performance boost and “Cloud will solve all problems”
  59. 59. Good reasons to migrate ● Extremely flexible ● Pay for what you use o cheap to fail o cutting cost of testing and applying new technologies ● Fast changes - get what you need when you need ● Allows to focus on your product - not on CDN, Mail sending, file storages,
  60. 60. File storage ● DIY - Distributed File System ● Let’s Amazon handle it - Elastic File System (Preview) ● Ready to change code - S3
  61. 61. S3, CloudFront, Beanstalk demo time

×