AWS Developer: The Big Picture - p-patel/software-engineer-knowledge-base GitHub Wiki

https://app.pluralsight.com/library/courses/aws-developer-big-picture/

What Is AWS?

The Web Application Conundrum

  • Small and big development teams can be limited/slowed down by on-premise infrastructure provisioning and scaling
  • Cloud enables on-demand provisioning and scaling

Hello Amazon Web Services

  • Computing services that can be used independently or in combination to run computer programs
  • Services provides some kind of computing operation - computing, messaging, storage, routing, or other
  • Can be used for web or non-web applications
  • No upfront costs for AWS, only charged for usage

Tracing the Global Infrastructure of AWS

  • Deploying globally provides two main benefits - latency and redundancy
  • AWS has the most Data Servers in the most geographical regions
  • Region | Availability Zone | Data Center - An AZ is a collection of data centers with independent power, network and connectivity. AZs are connected with high bandwidth connections
  • AWS Service Health Dashboard - http://status.aws.amazon.com

How Does AWS Work?

  • Services typically communicate with each other over TCP connections
  • All instances can be created in a single Virtual Private Clouds to provide superfast connections through local IP addresses
  • Individual AWS services can be added to a system as and when required
  • Security Groups secure each instance by providing light 'firewalls' around each instance

AWS vs. The Rest

  • Microsoft Azure - the model is similar to AWS, pricing is similar overall. An advantage to work on Azure when working on a Microsoft technology system
  • IBM Bluemix - implements the Cloud Foundary infrastructure specification to avoid vendor lockin and skills are also portable
  • Heroku - started as a hosting platform for Ruby on Rails, now supports any major web language and connected services e.g. databases. App deployment is really simple. Good for quickly starting off (use for hobby applications?)

Understanding the Core Services of AWS

Elastic Cloud Computer (EC2)

  • EC2 instances are computing resources
  • Instances running operations can increase/decrease automatically
  • EC2 instance is the basic unit of EC2 and is an OS-agnostic virtual server
  • Options: Amazon Machine Image (AMI) = OS + pre-installed applications. To update an instance with security patches - manually install updates or create a new instance and migrate application code. Further images are available from AWS Marketplace
  • Options: Instance types (the specification of the instances) - 'Compute Optimized' is the cheapest family
  • Options: Instance details - includes the number of instances with the same image and type with rules for automatic scaling. Elastic Beanstalk is provided to scale own applications that are installed on installed
  • Options: Add storage (Elastic Block Storage - EBS), live separately from EC2 instances and can be retained/deleted independently. Distinct from S3 storage as EBS is storage specifically for EC2 instances whereas S3 storage is for storing and serving independent files. EBS storage volumes can be configured.
  • Optons: Security Group - IP-based communication rules e.g. control who can SSH into instances, allow access between EC2 instances, allow access to db, accept incoming HTTP requests
  • Final step is to create instance with an existing key pair for SSH access
  • EC2 Pricing - charges are per hour based on AMI type and instance type. Reserved (cheaper) and Spot (cheapest) pricing types are also available. Free tier also available for 12 months
  • EC2 is used under the covers for other services e.g. RDS so managing and configuring instances is a useful skill

Simple Stoarge Service (S3)

  • A services that stores files
  • Any type of file, maximum filesize of 5TB
  • Buckets are the foundational structure in S3 to which you can add, edit and delete objects
  • Configuration options include permissions, hosting options and logging. Can trigger events when objects are added/modified/deleted, preserve older versions of objects and replicate objects across regions
  • Buckets are assigned URLs through which objects within them are accessed. URL structure: https://S3BucketRegion/BucketName/ObjectPath
  • Easty to use for static website hosting
  • S3 Pricing Structure - Amount of data stored, number of request and amount of data transferred

Relations Database Service (RDS)

  • Collection of AWS services for managed relational dbs (AWS manages automated backups, simple software updates and managed infrastructure)
  • Easy configuration and Read Replicas
  • Most major RDS are supported
  • Select EC2 instance
  • Can install a db on own EC2 instance if you want (but does not provide managed services provided by RDS), e.g. can DB snapshots and change hardware easily
  • RDS instance access is controlled through Security Group, to allow EC2 instance access, BI tool access but block external access
  • RDS pricing - depends on type of db, region, EC2 instance type being installed on
  • NoSQL dbs are also supported through other managed database offerings from Amazon

Route53

  • DNS management
  • Easily configure domain names to resolve to internal AWS services
  • EC2 instances can be configured with public IP addresses, but certain resources like S3 Buckets and load balancers are a little more complicated and don't have static, visible IP addresses.
  • Setup IP address resolution to resources directly, bypassing the need to see an IP (IP resolution still happens in the background)
  • Setup a Hosted Zones (root domain name), use Route53 to setup subdomains and configure them to route to AWS resources
  • Route53 pricing - Per Hosted Zone + per 1M queries
  • Route53 health check service - regular checks for a given URL path, with alerts for different rules

Enhancing Your App with AWS Databases and Application Services

Elastic Beanstalk

  • Application deployment and management
  • Provides a tool to manage and monitor EC2 instances.
  • Built around the concept of an application that contains multiple versions (upto 500)
  • Environments can be configured - e.g. test, prod
  • Dashboard available providing access to logging and metrics
  • Free (you pay for EC2 instances, load balancers and S3 separately)

DynamoDB

  • Document and Key/Value based NoSQL data storage
  • Works on the basis of a table which is unlimited in size
  • Billing is based on capacity read units and capacity write units

RedShift

  • Data warehousing solution
  • Import data from RDS, DynamoDB and S3 through ETL pipelines
  • Clustered node instances
  • Security - encrypt entire warehouse, VPC Protection, no Public IP possible
  • Available in Dense Storage and Dense Compute configurations

Virtual Private Cloud

  • Groups together resources with a shared access policy and that have a logical grouping
  • Subnets are used to split private and public accessible groups and assign different rules
  • Use a routing table and network ACL to secure resource access
  • Free

CloudWatch

  • Monitoring services for other Amazon cloud services
  • Offers monitoring of resources and alerts

CloudFront

  • Content delivery network - serve files globally with very fast connections
  • Combines S3, EC2, Route53 and load balancer
  • Free tier - 50Gb outgoing data and 2 million requests per month

Harnessing the Power of AWS from the Command Line to Code

Web Console

  • Services broken down by taxonomy
  • Resources Groups group resource by a particular function
  • Drag and drop common service shortcuts onto the main menu bar
  • Regions - many resources are not available to other resources across regions
  • Access Keys setup access for CLI and SDK access

SDKs

  • AWS Services code libraries for interactions with AWS services (typically wrap HTTP requests) and include code examples
  • Most popular languages supported
  • See http://github.com/aws

CLI

  • Type manual commands and/or create Shell scripts / Batch files
  • aws <service> <command> <arguments>
  • install using Windows installer or pip package
  • configuration - set access key, secret key and default region (access keys and secret keys are configured in Web Console)
  • aws dynomodb put-item --table-name aws-developer --item "{<add some json here (escape any double-quotes)>}"
⚠️ **GitHub.com Fallback** ⚠️