Difference between revisions of "AWS Cloud Essentials"
Jump to navigation
Jump to search
m (User moved page AWS cert notes to AWS Cloud Essentials without leaving a redirect) |
|||
| (78 intermediate revisions by the same user not shown) | |||
| Line 14: | Line 14: | ||
# Increase speed and agility | # Increase speed and agility | ||
# Go global in minutes | # Go global in minutes | ||
| + | |||
===Module 2: Compute in the Cloud=== | ===Module 2: Compute in the Cloud=== | ||
| Line 42: | Line 43: | ||
* Parameters: Minimum, Desired, Scale as Needed, Maximum EC2 instances | * Parameters: Minimum, Desired, Scale as Needed, Maximum EC2 instances | ||
| − | ====Elastic | + | ;Elastic Load Balancing |
| + | * Which EC2 instance handles a request is determined by a load balancer | ||
| + | * ELB = first "major managed services" to be discussed herein | ||
| + | * Regional rather than on individual EC2 instances guarantees high availability | ||
| + | * Automatically scales, with no additional cost | ||
| + | * Front-end independent | ||
| + | |||
| + | ; Messaging and Queuing | ||
| + | * SNS and SQS facilitate application integration | ||
| + | * Tightly coupled applications (A talks directly to B and depends on its I/O) are subject to faults | ||
| + | * "Loosely coupled" applications use a message queue as a buffer between processes A and B so if one fails, the other doesn't (necessarily) | ||
| + | * '''SQS''' (Simple Queue Service): send/store/receive messages between software components at any volume, with no faults; where messages are placed until processed | ||
| + | * '''SNS''' (Simple Notification Service): uses pub/sub (publish/subscribe) model to send messages to end-users/subscribers. Compatible w/ push/SMS/email | ||
| + | * Fault tolerance achieved through '''microservices''' architecture (i.e., loose coupling) | ||
| + | |||
| + | ====Additional Compute Services==== | ||
| + | * '''Serverless''': your code runs on servers, but you do not need to provision or manage these servers. | ||
| + | * Even EC2 requires management oversight to update server software, provisioning estimates, etc. | ||
| + | * '''AWS Lambda''' is a serverless compute option, maintained by AWS. Designed to be run by triggers, processes < 15 mins long (not deep learning). Pay only if triggered | ||
| + | * '''Elastic Container Service (ECS)''' provides portability but also access to a server. Runs in a Docker container | ||
| + | * ECS Docker containers run on clusters of EC2 machines | ||
| + | * '''Elastic Kubernetes Service (EKS)''': performs same functions as ECS using different software | ||
| + | * '''AWS Fargate''': serverless platform for ECS or EKS; manages server infrastructure for you | ||
| + | |||
| + | |||
| + | ===Module 3: AWS Global Infrastructure=== | ||
| + | * Regional data sovereignty | ||
| + | # Compliance - must your data reside in a certain jurisdiction? | ||
| + | # Proximity - speed of light still dictates speed | ||
| + | # Feature availability - some new services require physical hardware not everywhere available | ||
| + | # Pricing - costs 50% more to run in Brazil than Oregon | ||
| + | * A '''Region''' is a geographically isolated area, consisting of two or more Availability Zones | ||
| + | * '''Availability Zones''': each Region comprises multiple data centers. Each center or group of centers is an Availability Zone(AZ). Allow running across physical venues while keeping applications logically unfied | ||
| + | * AWS recommends (as "best practice") using redundantly deployed infrastructure in two different AZs- must your data reside in a certain jurisdiction? | ||
| + | |||
| + | ====Edge Locations==== | ||
| + | * An '''edge location''' is a site that Amazon CloudFront (AWS's CDN) uses to store cached copies of your content closer to your customers for faster delivery | ||
| + | * Edge locations also run a DNS, Amazon Route 53, directing customers to lowest latency venue | ||
| + | * '''AWS Outposts''' is fully operational mini Region, inside your building (100% O&O by AWS) | ||
| + | |||
| + | ====Provisioning AWS Services==== | ||
| + | # AWS Management Console: web-based interface | ||
| + | # AWS CLI: Automate provisioning through scripts | ||
| + | # AWS SDKs: programming language-specific APIs | ||
| + | * Managed tools: '''Elastic Beanstalk''' takes provided parameters and builds out a given configuration | ||
| + | * '''CloudFormation''' facilitates resource definitions in CloudFormation templates; uses JSON/YAML config files | ||
| + | |||
| + | |||
| + | ===Module 4: Networking=== | ||
| + | * A '''Virtual Private Cloud (VPC)''' is your own private network in AWS. Some may face the internet, others may be intranets. A '''subnet''' is a section of a VPC that can house resources like EC2 instances | ||
| + | * An Internet Gateway ('''IGW''') must be attached to VPC to reach the internet and for the internet to access resources on the VPC. To do so on a VPN requires a '''virtual private gateway''' | ||
| + | * A physical line is provided by '''AWS DirectConnect''' connects your firm's network with the VPC | ||
| + | ====Subnets and ACLs==== | ||
| + | * VPC access--in or out--only covers perimeter access to your assets; nothing internal is covered | ||
| + | * Layers of security | ||
| + | # network hardening | ||
| + | # application security | ||
| + | # user identity | ||
| + | # authentication and authorization | ||
| + | # DDoS prevention | ||
| + | # data integrity | ||
| + | # encryption....and much more | ||
| + | * Only technical reason for subnets in a VPC is to control access to the gateways; public subnets have access, private ones do not | ||
| + | * Every packet crossing a gateway is checked against a '''network access control list (ACL)'''. (EC2) instance level security also needed | ||
| + | * A '''Security Group''' is a virtual firewall controlling in- and outbound traffic for an EC2 instance | ||
| + | * Default AWS '''security groups''' deny all inbound traffic and allow all outbound traffic | ||
| + | |||
| + | ;Example of Sending a Packet Across Subnets | ||
| + | # EC2 A sends a packet to EC2 B | ||
| + | # Packet meets '''security group boundary''' of instance A. By default, the security group allows all outbound traffic, so it goes | ||
| + | # Packet must leave subnet boundary. Packet's destination must be on NACL to pass. (It is.) | ||
| + | # Packet proceeds to instance B's subnet. NACL allows it into the subnet. ('''NACLs deny all inbound and allow outbound traffic by default.''') If on B's security group list, it's allowed to proceed | ||
| + | Coming back | ||
| + | # Security groups allow all return traffic by default; they let Packet A out without consulting a list | ||
| + | # The subnet boundaries (NACLs) are '''stateless''' (as opposed to security groups, which are '''stateful'''); they must check all rules before letting the packet out | ||
| + | # Now back at the instance A subnet, NACLs must check again (because they're stateless) | ||
| + | # Final hurdle is the Security Group, which because it's stateful, remembers letting the packet out and thus allows its return | ||
| + | |||
| + | ====Global Networking==== | ||
| + | * Route 53 = Amazon's DNS | ||
| + | * Uses 1) latency-based, 2) geolocation, 3) geoproximity, 4) weighted round robin | ||
| + | * Also serves as a registrar | ||
| + | * Amazon CloudFront: CDN to deliver content to edge locations | ||
| + | |||
| + | ====Summary==== | ||
| + | * Networking: who should be allowed to communicate with each other? | ||
| + | * VPC, network ACLs, security groups, VPN, DirectConnect (dedicated line) | ||
| + | * Route 53 for DNS | ||
| + | |||
| + | |||
| + | ===Module 5: Storage & Databases=== | ||
| + | ====Elastic Block Store (EBS)==== | ||
| + | * Different EC2 storage types: instance storage volumes (local storage); terminate w/ instance of EC2 running on it (virtually, of course) | ||
| + | * EBS creates virtual hard drives ("EBS volumes") that attach to EC2 instances and are '''persistent''' | ||
| + | * specify size, type, config and attach an EBS volume to an EC2 instance | ||
| + | * '''instance stores''' provide temporary block storage for EC2 instances | ||
| + | * EBS provides block-level storage volumes to be used w/ EC2 instances | ||
| + | * backup using EBS snapshots regularly (they are '''incremental''' backups) | ||
| + | |||
| + | ====Simple Storage Service (S3)==== | ||
| + | * object store; objects stored in buckets | ||
| + | * Tiers: | ||
| + | ** S3 standard | ||
| + | ** Infrequent Access (S3-IA): less frequently accessed, but available on-demand. For storage backups, disaster recovery, objects requiring LT storage | ||
| + | ** IA-One Zone: cheaper than S3-IA but uses only one AZ to store data | ||
| + | ** S3 Glacier: LT data (e.g., for audit purposes); can be locked down using WORM (write-once/read-many) security | ||
| + | * Also: 1) Intelligent-Tiering (small fee auto-migrates to IA, Glacier), 2) Glacier Deep Archive (can access objects within 12 hrs) | ||
| + | |||
| + | ;EBS vs. S3 | ||
| + | * S3: complete objects or only occasional changes | ||
| + | ** Every object has a URL; S3 comes web-enabled; access rights included | ||
| + | ** Cheaper that running same storage as block-level | ||
| + | * EBS: complex read/write/update functions | ||
| + | ** updates are fast and incremental vs. updating entire object as in S3 | ||
| + | ** Object storage treats items as discrete, singular entities. Block storage uses delta updates | ||
| + | ** '''single availability zone''' | ||
| + | |||
| + | ====Elastic File System (EFS)==== | ||
| + | * auto-scaling, pan-AZ distributed file system (esp for Linux) | ||
| + | * EBS doesn't scale and is only available in the same AZ as your EC2 instance | ||
| + | |||
| + | ====Relational Database Service (RDS) and Aurora==== | ||
| + | * Can run databases on EC2 directly, but also in the cloud | ||
| + | * supports MySQL, PostgreSQL, Oracle, Microsoft SQL Server | ||
| + | * performs backups, upgrades, failover, etc automatically so no ongoing costs | ||
| + | * Aurora comes w/ MySQL or Postgres and is 10% of normal database cost (no shit sherlock, they're fucking open source). | ||
| + | ** Fully managed service | ||
| + | **Retains 6 copies of your data at all times (2 per availability zone). Continuous back-ups to S3 | ||
| + | ** 5x faster than MySQL and 3x faster than Postgres | ||
| + | |||
| + | ====DynamoDB==== | ||
| + | * severless, infinitely scaleable, NoSQL | ||
| + | * stores redundantly across AZs. Mirrors data across multiple drives | ||
| + | * addresses performance and scaling issues of traditional RDBMSs | ||
| + | * loose, flexible schema can store all types of objects | ||
| + | * printed 7.11trn API calls and peaked at 45.4 million per second on "Prime Day 2019". wood. | ||
| + | |||
| + | ====Redshift==== | ||
| + | * Data warehouse <math>\gets</math> data too complex to handle w/ traditional databases | ||
| + | * Good for "historical" (i.e., ''not'' realtime) data, e.g., how many widgets we sold in last hour | ||
| + | * Data warehousing as a service. Nodes in petabytes. | ||
| + | |||
| + | ====Additional Services==== | ||
| + | * CMS: Amazon DocumentDB | ||
| + | * Distributed Ledger: Amazon Managed Blockchain | ||
| + | * Immutable ledger: Amazon QLDB (Quantum Ledger Database) | ||
| + | * Performance: ElasticCatch (only Memcached and Redis); DAX (DynamoDB Accelerator) | ||
| + | * Graph database: Amazon Neptune | ||
| + | |||
| + | Category Deep Dive: [https://aws.amazon.com/getting-started/deep-dive-databases/ Databases] | ||
| + | |||
| + | |||
| + | ===Module 6: Security=== | ||
| + | ====Shared Responsibility Model==== | ||
| + | * "security '''in''' the cloud" (customer) vs. "security '''of''' the cloud" (AWS) | ||
| + | * most PHY stuff owned by AWS | ||
| + | * Customer: customer data, IAM; OS, network, firewall config & maintenance; encryption; network traffic protection | ||
| + | * AWS: software; compute/storage/database/networking and virtualization; AWS global infrastructure; regions/AZs/edge locations | ||
| + | |||
| + | ====User Permissions and Access==== | ||
| + | * Use MFA for root user immediately | ||
| + | * AWS Identity and Access Management ('''IAM''') | ||
| + | ** create permissionless user ('least privilege principle') | ||
| + | ** IAM policy is a JSON document that specifies what API calls a user may make | ||
| + | ** Groups: attaching a policy to users in a group grants all group members | ||
| + | ** Roles: have associated permissions that allow or deny certain actions | ||
| + | |||
| + | ====AWS Organizations==== | ||
| + | * central location to manage multiple AWS accounts | ||
| + | * consolidated billing, bulk discounts | ||
| + | * hierarchical groups for security, budget, compliance needs ('''OUs'''=organizational units) | ||
| + | * service control policies ('''SCPs''') to determine who has access to what | ||
| + | |||
| + | ====Compliance==== | ||
| + | * '''Artifact Agreements''': manage agreements for an individual account or all in an organzation (to comply w/ HIPAA, e.g.) | ||
| + | * '''Artifact Reports''': provides compliance info from 3rd parties/auditors that have tested and verified AWS is compliant | ||
| + | |||
| + | ====Additional Services==== | ||
| + | * AWS '''Shield Standard''': detects and mitigates malicious traffic in real time | ||
| + | * AWS '''Shield Advanced''': paid service, provides attack diagnostics; integrates w/ CloudFront, Route 53 and ELB. | ||
| + | * AWS '''Key Management Service (KMS)''': wallet for keys; can enable/disable at the IAM user/role level | ||
| + | * AWS '''Web Application Firewall (WAF)''': monitors network requests, together w/ CloudFront (CDN) and a load balancer | ||
| + | * Amazon '''Inspector''': performs automated security assessments; generates reports of suggestions; not guaranteed | ||
| + | * Amazon '''GuardDuty''': intelligent threat detection; appears to monitor internal (VPC) as well as external deviations | ||
| + | |||
| + | |||
| + | ===Module 7: Monitoring & Analytics=== | ||
| + | * Monitoring your environment in the cloud | ||
| + | * AWS '''CloudWatch''': web service to manage/detect problems with cloud platform | ||
| + | ** Set a threshold for a metric and create an alert and a '''trigger''' for an action | ||
| + | ** Integrated with SNS (simple notification service); allows SMS communications w/ employers | ||
| + | ** Many metrics = dashboard; reduces '''MTTR''' (mean time to resolution) and improve TCO | ||
| + | * AWS '''CloudTrail''': comprehensive API audit tool; records all API logs for the account; logs every request/event usually w/in 15 mins | ||
| + | ** '''CloudTrail Insights''': detects unusual API activities in AWS account; along w/ CloudTrail provides a complete audit trail | ||
| + | * AWS '''Trusted Advisor''': web service that inspects your AWS environment and provides realtime recommendations | ||
| + | ** compares your set-up to best practices in 5 categories ('''the five pillars'''): 1) cost optimization, 2) performance, 3) security, 4) fault tolerance, 5) service limits | ||
| + | ** provides recommendations: red circle, action recommended; orange triangle, investigation recommended; green square, no problems detected. | ||
| + | * Amazon '''GuardDuty''': service that provides intelligent threat detection for your AWS environment and resources. Identifies threats by continuously monitoring the network activity and account behavior within your AWS environment. | ||
| + | |||
| + | |||
| + | ===Module 8: Pricing & Support=== | ||
| + | * AWS Free Tier: 1) free, 2) 12 months free, 3) free trial | ||
| + | # AWS Lambda: 1m free invocations/month; always free < 1m | ||
| + | # S3: free for 5GB storage up to 12 mos | ||
| + | # '''Lightsail''': 1-mo trial of 750 hrs of usage | ||
| + | |||
| + | ;AWS Pricing | ||
| + | * Pay for what you use | ||
| + | * Pay less when you reserve (EC2 72% cheaper on a 1 or 3yr savings plan) | ||
| + | * Volume-based discounts for more use (S3 cheaper the more GBs) | ||
| + | |||
| + | ;Billing Dashboard | ||
| + | * Access '''CostExplorer''' and create budgets | ||
| + | * Publish AWS Cost and Usage Reports | ||
| + | * View spend by service; free tier usage; month-over-month comps | ||
| + | |||
| + | ;Consolidated Billing | ||
| + | * aggregates billing across '''AWS Organizations''' | ||
| + | |||
| + | ;AWS Budgets | ||
| + | * Set dollar-based alerts for your monthly costs | ||
| + | |||
| + | ;AWS Cost Explorer | ||
| + | * includes a default report of the costs and usage for your top five cost-accruing AWS services | ||
| + | |||
| + | ====Support Plans==== | ||
| + | 1. '''Basic''': access support functions like 24/7 access to customer service, documentation, whitepapers, support forums, AWS Trusted Advisor, and the AWS Personal Health Dashboard | ||
| + | |||
| + | 2. '''Developer''': email customer support directly with a 24 hour response time on any questions you have. And responses of less than 12 hours in case your systems are impaired | ||
| + | * Best practice guidance | ||
| + | * Client-side diagnostic tools | ||
| + | * Building-block architecture support, which consists of guidance for how to use AWS offerings, features, and services together | ||
| + | |||
| + | 3. '''Business''': direct phone access to our support team that has a four hour response SLA. If your production system is impaired, and a one hour SLA for production systems down. Plus infrastructure event management | ||
| + | * Use-case guidance to identify AWS offerings, features, and services that can best support your specific needs | ||
| + | * All AWS Trusted Advisor checks | ||
| + | * Limited support for third-party software, such as common operating systems and application stack components | ||
| + | |||
| + | 4. '''Enterprise''': 15 minute SLA for business critical workloads, a dedicated technical account manager for '''TAM (Technical Account Manager)''' | ||
| + | * Application architecture guidance, which is a consultative relationship to support your company’s specific use cases and applications | ||
| + | * Infrastructure event management: A short-term engagement with AWS Support that helps your company gain a better understanding of your use cases. This also provides your company with architectural and scaling guidance. | ||
| + | * A Technical Account Manager | ||
| + | |||
| + | ;AWS Marketplace | ||
| + | * digital catalog of thousands of software listings from 3rd parties | ||
| + | * Categories: 1) Business Applications, 2) Data and Analytics, 3) DevOps, 4) Infrastructure Software, 5) IoT, 6) Machine Learning, 7) Migration, 8) Security | ||
| + | |||
| + | |||
| + | ===Module 9: Migration & Innovation=== | ||
| + | ;AWS Cloud Adoption Framework (AWS CAF) | ||
| + | * The 6 '''perspectives''' | ||
| + | # Business: business managers, finance managers, budget owners, strategy stakeholders | ||
| + | # People: HR/hiring manager, staffing | ||
| + | # Governance: CIO (I=information), program managers, enterprice architects, business analysts, portfolio managers | ||
| + | # Platform: cloud architect, CTO, IT managers, solutions architects | ||
| + | # Security: CISO (Chief Info Security Officer), IT security managers and analysts | ||
| + | # Operations: IT ops, IT support | ||
| + | |||
| + | ;Another 6 Looks at the 6 Perspectives | ||
| + | # Business: create a strong business case for cloud adoption and prioritize cloud adoption initiatives. Ensure that your business strategies and goals align with your IT strategies and goals. | ||
| + | # People: evaluate organizational structures and roles, new skill and process requirements, and identify gaps. This helps prioritize training, staffing, and organizational changes. | ||
| + | # Governance: understand how to update the staff skills and processes necessary to ensure business governance in the cloud. Manage and measure cloud investments to evaluate business outcomes. | ||
| + | # Platform: understand and communicate the structure of IT systems and their relationships. Describe the architecture of the target state environment in detail. | ||
| + | # Security: ensure the org meets objectives for visibility, auditability, control and agility. structure the selection and implementation of security controls that meet the organization’s needs. | ||
| + | # Operations: Align with and support the operations of the business. The AWS CAF helps these stakeholders define current operating procedures and identify the process changes and training needed to implement successful cloud adoption. | ||
| + | |||
| + | |||
| + | ; 6 key factors in cloud migration strategy (the 6 Rs) | ||
| + | # Rehosting: lift-and-shift; move entire app over | ||
| + | # Replatforming: "lift, tinker and shift"; make a few changes to take advantage of cloud | ||
| + | # Refactoring: re-architecting an application to take full advantage of the cloud, doing things otherwise impossible | ||
| + | # Repurchasing: replacing an existing product, e.g., move from CRM system to Salesforce.com | ||
| + | # Retaining: keeping mission critical apps in native environment pending refactoring for the cloud | ||
| + | # Retiring: removing no-longer-needed apps | ||
| + | |||
| + | ====AWS Snow Family==== | ||
| + | * AWS Snowcone: hold 8TB and contains edge computing (either EC2 or IoT Greengrass) | ||
| + | * AWS Snowball Edge Storage optimized: 80TB HDD, 40vCPUs, 80GiB RAM | ||
| + | * AWS Snowball Edge Compute optimized: 42TB HDD, 52vCPUs, 208GiB RAM | ||
| + | * AWS Snowmobile: 45 foot shipping container that houses 100 petabytes | ||
| + | |||
| + | ====Innovation with AWS==== | ||
| + | * Drop a VMWare-based infrastructure into AWS via VMWare Cloud | ||
| + | * AI/ML: SageMaker (quickly build ML models), Augmented AI, A2I, Lex (voice), Textract (OCR), DeepRacer(reinforcement learning) | ||
| + | * '''Serverless''': don't require provisioning servers, e.g., Amazon Lambda | ||
| + | * '''Artificial Intelligence''': speech-to-text (Transcribe), text patterns (Comprehend), fraud (Fraud Detector), chatbots (Lex) | ||
| + | * '''Machine Learning''': Amazon SageMaker | ||
| + | |||
| + | |||
| + | ===Module 10: The Cloud Journey=== | ||
| + | ; Five Pillars of the Well-Architected Framework | ||
| + | # Operational Excellence: performing operations as code; annotating docs; anticipating failure; making small, frequent, reversible changes | ||
| + | # Security: automate security best practices; apply security at all layers; protect data in transit and at rest | ||
| + | # Reliability: test recovery procedures; scale horizontally to increase aggregate availability; auto-recovery from failure | ||
| + | # Performance Efficiency: experiment often; use serverless architectures; design systems to be global in minutes | ||
| + | # Cost Optimization: adopt a consumption model; analyze & attribute expenditures; use managed services to reduce TCO | ||
| + | |||
| + | ;Five Different Pillars of the WAF | ||
| + | # Operational excellence: run and monitor systems to deliver business value and to continually improve supporting processes and procedures. | ||
| + | # Security: protect information, systems, and assets while delivering business value through risk assessments and mitigation strategies. | ||
| + | # Reliability: Recover from infrastructure or service disruptions; dynamically acquire computing resources to meet demand; mitigate disruptions such as misconfigurations or transient network issues | ||
| + | # Performance Efficiency: use computing resources efficiently to meet system requirements and to maintain that efficiency as demand changes and technologies evolve. | ||
| + | # Cost Optimization: run systems to deliver business value at the lowest price point. | ||
| + | |||
| + | ;Benefits of the AWS Cloud | ||
| + | # Trade upfront for variable costs: don't spend $200k on servers | ||
| + | # Eliminate data center costs: running a data center <math>\neq</math> most companies' core business | ||
| + | # Stop guessing capacity: don't buy more capacity than you need; pay only for peak when in use | ||
| + | # Massive economies of scale (lower variable cost): achieve lower variable costs w/ PAYGO | ||
| + | # Increase speed and agility: flexibility makes easy to develop and launch applications | ||
| + | # Go global in minutes: use AMZN's global network | ||
| + | |||
| + | ===Module 11: AWS Certified Cloud Practitioner Basics=== | ||
| + | ;Exam Domains | ||
| + | # Cloud Concepts (26%) | ||
| + | # Security and Compliance (25%) | ||
| + | # Technology (33%) | ||
| + | # Billing and Pricing (16%) | ||
| + | |||
| + | |||
| + | ====Exam Details==== | ||
| + | * Recommend at least 6 months of experience w/ AWS Cloud in any role | ||
Latest revision as of 01:58, 16 March 2021
Module 1: Intro to AWS[edit]
- Cloud computing is the on-demand delivery of IT resources over the internet with pay-as-you-go pricing
- The undifferentiated heavy lifting of IT: installs, backups, etc that have nothing to do w/ core business
- 3 types of cloud deployment
- Cloud-based: servers, databases, networking all live in the cloud
- On-premises: aka private cloud. Resources deployed locally using virtualization and resource management tools, which increase resource utilization
- Hybrid deployment: cloud-based resources are connected to on-premises infrastructure. Good for legacy apps, govt regulations
- Six reasons to use the cloud
- Trade upfront for variable costs
- Eliminate data center costs
- Stop guessing capacity
- Massive economies of scale (lower variable cost)
- Increase speed and agility
- Go global in minutes
Module 2: Compute in the Cloud[edit]
- Spinning up an instance of EC2 instigates a hypervisor to manage VMs using multitenancy. Guarantees security.
- Vertical scaling is the expansion in CPU/RAM that happens on the fly
- Server acquisition cheaper under the Compute-as-a-Service model
- Normal process: 1) purchase hardware, 2) wait for delivery, 3) install in data center, 4) configure
- AWS process: 1) provision/launch EC2 in mins, 2) stop using it, 3) PAYGO, 4) pay only for necessary server capacity (no "dark fiber" issue)
EC2[edit]
- Different instances for different use cases
- general purpose: application servers; gaming servers; backend servers; small/medium databases
- compute optimized: high-performance web servers, compute-intensive applications servers, and dedicated gaming servers
- memory optimized: a workload that requires large amounts of data to be preloaded before running an application; high-performance databases
- accelerated computing: floating-point number calculations, graphics processing, and data pattern matching
- storage optimized: distributed file systems, data warehousing applications, and high-frequency online transaction processing (OLTP) systems
- Input/output Operations Per Second (IOPS) measures performance of storage device
- Pricing
- On-demand: PAYGO, no contract
- Savings Plan: 72% off USD/hr for fixed usage contract over 1/3 yr term
- Reserved instances: 75% off On-Demand; 1/3yr term
- Spot instances: 90% off but revokable by AMZN w/ 2mins notice
- Dedicated Hosts: non-multitenancy dedicated machines; usually for compliance
- Scaling EC2
- EC2 Auto Scaling: automatically add/drop EC2 instances based on demand (dynamic, predictive or both)
- Scale up = increase depth (add more compute power), scale out = increase breadth (add machines)
- Parameters: Minimum, Desired, Scale as Needed, Maximum EC2 instances
- Elastic Load Balancing
- Which EC2 instance handles a request is determined by a load balancer
- ELB = first "major managed services" to be discussed herein
- Regional rather than on individual EC2 instances guarantees high availability
- Automatically scales, with no additional cost
- Front-end independent
- Messaging and Queuing
- SNS and SQS facilitate application integration
- Tightly coupled applications (A talks directly to B and depends on its I/O) are subject to faults
- "Loosely coupled" applications use a message queue as a buffer between processes A and B so if one fails, the other doesn't (necessarily)
- SQS (Simple Queue Service): send/store/receive messages between software components at any volume, with no faults; where messages are placed until processed
- SNS (Simple Notification Service): uses pub/sub (publish/subscribe) model to send messages to end-users/subscribers. Compatible w/ push/SMS/email
- Fault tolerance achieved through microservices architecture (i.e., loose coupling)
Additional Compute Services[edit]
- Serverless: your code runs on servers, but you do not need to provision or manage these servers.
- Even EC2 requires management oversight to update server software, provisioning estimates, etc.
- AWS Lambda is a serverless compute option, maintained by AWS. Designed to be run by triggers, processes < 15 mins long (not deep learning). Pay only if triggered
- Elastic Container Service (ECS) provides portability but also access to a server. Runs in a Docker container
- ECS Docker containers run on clusters of EC2 machines
- Elastic Kubernetes Service (EKS): performs same functions as ECS using different software
- AWS Fargate: serverless platform for ECS or EKS; manages server infrastructure for you
Module 3: AWS Global Infrastructure[edit]
- Regional data sovereignty
- Compliance - must your data reside in a certain jurisdiction?
- Proximity - speed of light still dictates speed
- Feature availability - some new services require physical hardware not everywhere available
- Pricing - costs 50% more to run in Brazil than Oregon
- A Region is a geographically isolated area, consisting of two or more Availability Zones
- Availability Zones: each Region comprises multiple data centers. Each center or group of centers is an Availability Zone(AZ). Allow running across physical venues while keeping applications logically unfied
- AWS recommends (as "best practice") using redundantly deployed infrastructure in two different AZs- must your data reside in a certain jurisdiction?
Edge Locations[edit]
- An edge location is a site that Amazon CloudFront (AWS's CDN) uses to store cached copies of your content closer to your customers for faster delivery
- Edge locations also run a DNS, Amazon Route 53, directing customers to lowest latency venue
- AWS Outposts is fully operational mini Region, inside your building (100% O&O by AWS)
Provisioning AWS Services[edit]
- AWS Management Console: web-based interface
- AWS CLI: Automate provisioning through scripts
- AWS SDKs: programming language-specific APIs
- Managed tools: Elastic Beanstalk takes provided parameters and builds out a given configuration
- CloudFormation facilitates resource definitions in CloudFormation templates; uses JSON/YAML config files
Module 4: Networking[edit]
- A Virtual Private Cloud (VPC) is your own private network in AWS. Some may face the internet, others may be intranets. A subnet is a section of a VPC that can house resources like EC2 instances
- An Internet Gateway (IGW) must be attached to VPC to reach the internet and for the internet to access resources on the VPC. To do so on a VPN requires a virtual private gateway
- A physical line is provided by AWS DirectConnect connects your firm's network with the VPC
Subnets and ACLs[edit]
- VPC access--in or out--only covers perimeter access to your assets; nothing internal is covered
- Layers of security
- network hardening
- application security
- user identity
- authentication and authorization
- DDoS prevention
- data integrity
- encryption....and much more
- Only technical reason for subnets in a VPC is to control access to the gateways; public subnets have access, private ones do not
- Every packet crossing a gateway is checked against a network access control list (ACL). (EC2) instance level security also needed
- A Security Group is a virtual firewall controlling in- and outbound traffic for an EC2 instance
- Default AWS security groups deny all inbound traffic and allow all outbound traffic
- Example of Sending a Packet Across Subnets
- EC2 A sends a packet to EC2 B
- Packet meets security group boundary of instance A. By default, the security group allows all outbound traffic, so it goes
- Packet must leave subnet boundary. Packet's destination must be on NACL to pass. (It is.)
- Packet proceeds to instance B's subnet. NACL allows it into the subnet. (NACLs deny all inbound and allow outbound traffic by default.) If on B's security group list, it's allowed to proceed
Coming back
- Security groups allow all return traffic by default; they let Packet A out without consulting a list
- The subnet boundaries (NACLs) are stateless (as opposed to security groups, which are stateful); they must check all rules before letting the packet out
- Now back at the instance A subnet, NACLs must check again (because they're stateless)
- Final hurdle is the Security Group, which because it's stateful, remembers letting the packet out and thus allows its return
Global Networking[edit]
- Route 53 = Amazon's DNS
- Uses 1) latency-based, 2) geolocation, 3) geoproximity, 4) weighted round robin
- Also serves as a registrar
- Amazon CloudFront: CDN to deliver content to edge locations
Summary[edit]
- Networking: who should be allowed to communicate with each other?
- VPC, network ACLs, security groups, VPN, DirectConnect (dedicated line)
- Route 53 for DNS
Module 5: Storage & Databases[edit]
Elastic Block Store (EBS)[edit]
- Different EC2 storage types: instance storage volumes (local storage); terminate w/ instance of EC2 running on it (virtually, of course)
- EBS creates virtual hard drives ("EBS volumes") that attach to EC2 instances and are persistent
- specify size, type, config and attach an EBS volume to an EC2 instance
- instance stores provide temporary block storage for EC2 instances
- EBS provides block-level storage volumes to be used w/ EC2 instances
- backup using EBS snapshots regularly (they are incremental backups)
Simple Storage Service (S3)[edit]
- object store; objects stored in buckets
- Tiers:
- S3 standard
- Infrequent Access (S3-IA): less frequently accessed, but available on-demand. For storage backups, disaster recovery, objects requiring LT storage
- IA-One Zone: cheaper than S3-IA but uses only one AZ to store data
- S3 Glacier: LT data (e.g., for audit purposes); can be locked down using WORM (write-once/read-many) security
- Also: 1) Intelligent-Tiering (small fee auto-migrates to IA, Glacier), 2) Glacier Deep Archive (can access objects within 12 hrs)
- EBS vs. S3
- S3: complete objects or only occasional changes
- Every object has a URL; S3 comes web-enabled; access rights included
- Cheaper that running same storage as block-level
- EBS: complex read/write/update functions
- updates are fast and incremental vs. updating entire object as in S3
- Object storage treats items as discrete, singular entities. Block storage uses delta updates
- single availability zone
Elastic File System (EFS)[edit]
- auto-scaling, pan-AZ distributed file system (esp for Linux)
- EBS doesn't scale and is only available in the same AZ as your EC2 instance
Relational Database Service (RDS) and Aurora[edit]
- Can run databases on EC2 directly, but also in the cloud
- supports MySQL, PostgreSQL, Oracle, Microsoft SQL Server
- performs backups, upgrades, failover, etc automatically so no ongoing costs
- Aurora comes w/ MySQL or Postgres and is 10% of normal database cost (no shit sherlock, they're fucking open source).
- Fully managed service
- Retains 6 copies of your data at all times (2 per availability zone). Continuous back-ups to S3
- 5x faster than MySQL and 3x faster than Postgres
DynamoDB[edit]
- severless, infinitely scaleable, NoSQL
- stores redundantly across AZs. Mirrors data across multiple drives
- addresses performance and scaling issues of traditional RDBMSs
- loose, flexible schema can store all types of objects
- printed 7.11trn API calls and peaked at 45.4 million per second on "Prime Day 2019". wood.
Redshift[edit]
- Data warehouse [math]\displaystyle{ \gets }[/math] data too complex to handle w/ traditional databases
- Good for "historical" (i.e., not realtime) data, e.g., how many widgets we sold in last hour
- Data warehousing as a service. Nodes in petabytes.
Additional Services[edit]
- CMS: Amazon DocumentDB
- Distributed Ledger: Amazon Managed Blockchain
- Immutable ledger: Amazon QLDB (Quantum Ledger Database)
- Performance: ElasticCatch (only Memcached and Redis); DAX (DynamoDB Accelerator)
- Graph database: Amazon Neptune
Category Deep Dive: Databases
Module 6: Security[edit]
[edit]
- "security in the cloud" (customer) vs. "security of the cloud" (AWS)
- most PHY stuff owned by AWS
- Customer: customer data, IAM; OS, network, firewall config & maintenance; encryption; network traffic protection
- AWS: software; compute/storage/database/networking and virtualization; AWS global infrastructure; regions/AZs/edge locations
User Permissions and Access[edit]
- Use MFA for root user immediately
- AWS Identity and Access Management (IAM)
- create permissionless user ('least privilege principle')
- IAM policy is a JSON document that specifies what API calls a user may make
- Groups: attaching a policy to users in a group grants all group members
- Roles: have associated permissions that allow or deny certain actions
AWS Organizations[edit]
- central location to manage multiple AWS accounts
- consolidated billing, bulk discounts
- hierarchical groups for security, budget, compliance needs (OUs=organizational units)
- service control policies (SCPs) to determine who has access to what
Compliance[edit]
- Artifact Agreements: manage agreements for an individual account or all in an organzation (to comply w/ HIPAA, e.g.)
- Artifact Reports: provides compliance info from 3rd parties/auditors that have tested and verified AWS is compliant
Additional Services[edit]
- AWS Shield Standard: detects and mitigates malicious traffic in real time
- AWS Shield Advanced: paid service, provides attack diagnostics; integrates w/ CloudFront, Route 53 and ELB.
- AWS Key Management Service (KMS): wallet for keys; can enable/disable at the IAM user/role level
- AWS Web Application Firewall (WAF): monitors network requests, together w/ CloudFront (CDN) and a load balancer
- Amazon Inspector: performs automated security assessments; generates reports of suggestions; not guaranteed
- Amazon GuardDuty: intelligent threat detection; appears to monitor internal (VPC) as well as external deviations
Module 7: Monitoring & Analytics[edit]
- Monitoring your environment in the cloud
- AWS CloudWatch: web service to manage/detect problems with cloud platform
- Set a threshold for a metric and create an alert and a trigger for an action
- Integrated with SNS (simple notification service); allows SMS communications w/ employers
- Many metrics = dashboard; reduces MTTR (mean time to resolution) and improve TCO
- AWS CloudTrail: comprehensive API audit tool; records all API logs for the account; logs every request/event usually w/in 15 mins
- CloudTrail Insights: detects unusual API activities in AWS account; along w/ CloudTrail provides a complete audit trail
- AWS Trusted Advisor: web service that inspects your AWS environment and provides realtime recommendations
- compares your set-up to best practices in 5 categories (the five pillars): 1) cost optimization, 2) performance, 3) security, 4) fault tolerance, 5) service limits
- provides recommendations: red circle, action recommended; orange triangle, investigation recommended; green square, no problems detected.
- Amazon GuardDuty: service that provides intelligent threat detection for your AWS environment and resources. Identifies threats by continuously monitoring the network activity and account behavior within your AWS environment.
Module 8: Pricing & Support[edit]
- AWS Free Tier: 1) free, 2) 12 months free, 3) free trial
- AWS Lambda: 1m free invocations/month; always free < 1m
- S3: free for 5GB storage up to 12 mos
- Lightsail: 1-mo trial of 750 hrs of usage
- AWS Pricing
- Pay for what you use
- Pay less when you reserve (EC2 72% cheaper on a 1 or 3yr savings plan)
- Volume-based discounts for more use (S3 cheaper the more GBs)
- Billing Dashboard
- Access CostExplorer and create budgets
- Publish AWS Cost and Usage Reports
- View spend by service; free tier usage; month-over-month comps
- Consolidated Billing
- aggregates billing across AWS Organizations
- AWS Budgets
- Set dollar-based alerts for your monthly costs
- AWS Cost Explorer
- includes a default report of the costs and usage for your top five cost-accruing AWS services
Support Plans[edit]
1. Basic: access support functions like 24/7 access to customer service, documentation, whitepapers, support forums, AWS Trusted Advisor, and the AWS Personal Health Dashboard
2. Developer: email customer support directly with a 24 hour response time on any questions you have. And responses of less than 12 hours in case your systems are impaired
- Best practice guidance
- Client-side diagnostic tools
- Building-block architecture support, which consists of guidance for how to use AWS offerings, features, and services together
3. Business: direct phone access to our support team that has a four hour response SLA. If your production system is impaired, and a one hour SLA for production systems down. Plus infrastructure event management
- Use-case guidance to identify AWS offerings, features, and services that can best support your specific needs
- All AWS Trusted Advisor checks
- Limited support for third-party software, such as common operating systems and application stack components
4. Enterprise: 15 minute SLA for business critical workloads, a dedicated technical account manager for TAM (Technical Account Manager)
- Application architecture guidance, which is a consultative relationship to support your company’s specific use cases and applications
- Infrastructure event management: A short-term engagement with AWS Support that helps your company gain a better understanding of your use cases. This also provides your company with architectural and scaling guidance.
- A Technical Account Manager
- AWS Marketplace
- digital catalog of thousands of software listings from 3rd parties
- Categories: 1) Business Applications, 2) Data and Analytics, 3) DevOps, 4) Infrastructure Software, 5) IoT, 6) Machine Learning, 7) Migration, 8) Security
Module 9: Migration & Innovation[edit]
- AWS Cloud Adoption Framework (AWS CAF)
- The 6 perspectives
- Business: business managers, finance managers, budget owners, strategy stakeholders
- People: HR/hiring manager, staffing
- Governance: CIO (I=information), program managers, enterprice architects, business analysts, portfolio managers
- Platform: cloud architect, CTO, IT managers, solutions architects
- Security: CISO (Chief Info Security Officer), IT security managers and analysts
- Operations: IT ops, IT support
- Another 6 Looks at the 6 Perspectives
- Business: create a strong business case for cloud adoption and prioritize cloud adoption initiatives. Ensure that your business strategies and goals align with your IT strategies and goals.
- People: evaluate organizational structures and roles, new skill and process requirements, and identify gaps. This helps prioritize training, staffing, and organizational changes.
- Governance: understand how to update the staff skills and processes necessary to ensure business governance in the cloud. Manage and measure cloud investments to evaluate business outcomes.
- Platform: understand and communicate the structure of IT systems and their relationships. Describe the architecture of the target state environment in detail.
- Security: ensure the org meets objectives for visibility, auditability, control and agility. structure the selection and implementation of security controls that meet the organization’s needs.
- Operations: Align with and support the operations of the business. The AWS CAF helps these stakeholders define current operating procedures and identify the process changes and training needed to implement successful cloud adoption.
- 6 key factors in cloud migration strategy (the 6 Rs)
- Rehosting: lift-and-shift; move entire app over
- Replatforming: "lift, tinker and shift"; make a few changes to take advantage of cloud
- Refactoring: re-architecting an application to take full advantage of the cloud, doing things otherwise impossible
- Repurchasing: replacing an existing product, e.g., move from CRM system to Salesforce.com
- Retaining: keeping mission critical apps in native environment pending refactoring for the cloud
- Retiring: removing no-longer-needed apps
AWS Snow Family[edit]
- AWS Snowcone: hold 8TB and contains edge computing (either EC2 or IoT Greengrass)
- AWS Snowball Edge Storage optimized: 80TB HDD, 40vCPUs, 80GiB RAM
- AWS Snowball Edge Compute optimized: 42TB HDD, 52vCPUs, 208GiB RAM
- AWS Snowmobile: 45 foot shipping container that houses 100 petabytes
Innovation with AWS[edit]
- Drop a VMWare-based infrastructure into AWS via VMWare Cloud
- AI/ML: SageMaker (quickly build ML models), Augmented AI, A2I, Lex (voice), Textract (OCR), DeepRacer(reinforcement learning)
- Serverless: don't require provisioning servers, e.g., Amazon Lambda
- Artificial Intelligence: speech-to-text (Transcribe), text patterns (Comprehend), fraud (Fraud Detector), chatbots (Lex)
- Machine Learning: Amazon SageMaker
Module 10: The Cloud Journey[edit]
- Five Pillars of the Well-Architected Framework
- Operational Excellence: performing operations as code; annotating docs; anticipating failure; making small, frequent, reversible changes
- Security: automate security best practices; apply security at all layers; protect data in transit and at rest
- Reliability: test recovery procedures; scale horizontally to increase aggregate availability; auto-recovery from failure
- Performance Efficiency: experiment often; use serverless architectures; design systems to be global in minutes
- Cost Optimization: adopt a consumption model; analyze & attribute expenditures; use managed services to reduce TCO
- Five Different Pillars of the WAF
- Operational excellence: run and monitor systems to deliver business value and to continually improve supporting processes and procedures.
- Security: protect information, systems, and assets while delivering business value through risk assessments and mitigation strategies.
- Reliability: Recover from infrastructure or service disruptions; dynamically acquire computing resources to meet demand; mitigate disruptions such as misconfigurations or transient network issues
- Performance Efficiency: use computing resources efficiently to meet system requirements and to maintain that efficiency as demand changes and technologies evolve.
- Cost Optimization: run systems to deliver business value at the lowest price point.
- Benefits of the AWS Cloud
- Trade upfront for variable costs: don't spend $200k on servers
- Eliminate data center costs: running a data center [math]\displaystyle{ \neq }[/math] most companies' core business
- Stop guessing capacity: don't buy more capacity than you need; pay only for peak when in use
- Massive economies of scale (lower variable cost): achieve lower variable costs w/ PAYGO
- Increase speed and agility: flexibility makes easy to develop and launch applications
- Go global in minutes: use AMZN's global network
Module 11: AWS Certified Cloud Practitioner Basics[edit]
- Exam Domains
- Cloud Concepts (26%)
- Security and Compliance (25%)
- Technology (33%)
- Billing and Pricing (16%)
Exam Details[edit]
- Recommend at least 6 months of experience w/ AWS Cloud in any role