Global Infra

  1. overview
    • region > AZ > DC
  2. Availability zones
    • each AZ is designed to be a separate fault domain
    • recommend deploying your apps in multiple AZz for redundancy
  3. Regions
    • traffic within the region (between AZs) is private
    • traffic between regions is public via internet

VPC

  1. What’s a VPC
    • a private set of networks dedicated to a single customer within an AWS region
  2. Create and setup IP addressing
    • private:
    • public:
      • Public - IPv4, ephermeral
      • EIP - staci IPv4, reassigin to any instance in the AZ
      • IPv6 - public
  3. CIDR blocks
    • classless inter-domain routing
  4. IP subnets
  5. Internet gateways
    • used for go out VPC
  6. NAT
    • Network Address Translation
    • For internal networks only, can’t be used on the internet
    • Routers and firewalls use NAT to translate a private address into a public IPv4 that can communicate on the internet
    • NAT gateway:
    • NAT instance:
  7. VPC peering
    • Network connecton allowing 2 VPCs to route traffic between each other
    • VPCs can be in the same or a different region
    • limitaltions: can’t overlapping IPs (No CIDR overlap)
    • leverages private networking, not the public internet
  8. AWS direct connect
    • a permaantment connectoin between your dc and the AWS cloud via a WAN connection
    • require telecome provider to establish a WAN connection
    • connected vai a virtual gateway within the VPC
    • uses Border Gateay Protocol(BGP) and private autonomous systme number (ASNs) for routing
    • VPGs (virtual private gateways) in VPC
  9. VPN connectivity
    • AWS-Managed VPN
      • a hardware virtual private gateway (VPG)
    • AWS VPN CloudHub
      • a multipoint VPN endpoint for branch offices
    • Customer-provided VPN solution
  10. IP route tables
  11. VPC use cases
    • single-tier public website
      • a VPC with a single public subnet only
    • multi-tier: not depent on data in other DC
      • a VPC with a single public subnet and private subnetß
    • multi-tier: transfer private data between DC
      • a VPC with a single public and private subnets and hardware VPN access
    • Restore/Migrate your private DC in cloud
      • a VPC with a single private subnets and hardware VPN access
  12. NACLs and security groups
    • NACLs
      • network access control lists operate like firewar rules for an entire subnet
      • each subnet has a default NACL that permits all in boudn and outboudn traffic until other rules are set
    • Security groups
      • act as a virtual firewarll at the instance level, not the subnet level
    • Compare

EC2

  1. What’s EC2?
    • EC2 stands for Elastic Compute Cloud
    • EC2 instances are vm
    • Provide scalable, secure compute space in the cloud
    • Billed per second or per hour
  2. What’s an EC2 instance type
    • eg: T2.micro
      • T represents the family
        • define capabilites such as storage, memory and cpu options
      • 2 represents the generation
        • verson number
      • micro represents the size
    • each type for a specific purpose
  3. Types
    • Family type: C
    • Family type: X and R
    • Family type: D, H and I
    • Family type: F, G and P
    • Family type: T
  4. Graphics optimized instance
    • Elastic GPU
      • an elastic GPU to an EC2 instance to accelerate the performance of the graphics in your app
    • Bare Metal instance type
  5. EC2 purchasing options
    • EC2 instances
      • on-demand
      • reserved instances (RI)
        • standard RI
        • convertible RI
        • scheduled RI
      • spot instances
        • caveats
      • dedicated instances
      • dedicated hosts
  6. Instance Size and Implications
    • size always match your workload resource requirements to the instance type and size
    • storage for EC2
      • instance store
        • local, ephemeral storage for templrary data
      • network
        • persistent storage on EBS, EFS, or S3
  7. Placement groups
    • determin where instances are placed on the physical hardwar
    • two options
      • cluster placemnt groups
        • in one AZ for low latency
      • spread placement groups
        • between AZs
  8. Deploy EC2
    • Launch Tempates
    • Instance Metada
      • dynamic data
      • user data
      • Caveats
    • key pairs
  9. Trouble shooting
    • tools
      • AWS cloudwatch
        • monitor the resource and apps in AWS
      • Trusted Advisor
        • monitor env and give recommendataions on how to improve
      • VPC Flow Logs
        • allows you to gather infor about the IP traffic going to and from the network interface in your VPC
      • Console
      • OS-level tools

AMI

  1. What’s an AMI?
    • contains the infro needed to launch an EC2 instance
    • components of an AMI
      • a template
        • OS, apps, data, configuration …
      • launch permissions
      • a block device mapping
  2. Actions on AMI
    • create an AMI
    • copy AMIs to other regions
    • deploy an EC2 instance from an AMI
  3. AMI security and updates
    • keep instance up to date

AWS Storage

  1. What’s storage?
    • a place to store your data
    • used for
      • os
      • apps and their data
      • archiving data, logs and so on
      • compliance requirements
    • options:
      • EBS, EC2 store, EFS, S3/Glacier
  2. Types of Storage
    • Block
      • EBS (more persistent)
      • EC2 store (more temporary)
    • File storage
      • EFS
    • Object storage
      • S3
      • Glacier
  3. EBS (Elastic Block Storage)
    • can be attached to instance in the same AZ
    • can be launched as encrypted volumes for added security
    • dynaimcally
    • zdt
    • Use Cases:
      • boot drives for any OS
      • recommended storage option for running a db
      • big data processing
      • can be primary storage for data requiring frequent and granular updates
    • Typs of EBS volums
      • cold HDD
      • throughput-optimized HDD
      • general purpose SSD
      • provisioned IOPS SSD
      • EBS optimized instances
  4. EC2 instance store
    • provides temporary block-level storage
    • the dta only persistes for the life of the instance
    • volume types
      • HDD
      • SSD
      • NVMe: None-volatile memory express
    • Use cases:
      • temporary storage of info that changes a log
      • temporary data, such as scratch data, buffes and cache
      • replicated data that’s copied across multiple instance
  5. EFS (Elastic File System)
    • Use cases:
      • big data storage
      • container storage
      • content serving
      • enterprise apps
      • media processing workflows
      • any time multiple instances need access to the same data
  6. S3 and Glacier

  7. Other storage and data device
    • Storage gateway
      • hybrid service: allow your on-premises apps to use AWS cloud storage
      • typs:
        • tape gateway
        • file gateway
        • volume gateway
          • cached volumes
          • stored volumes
    • snowball
      • service helps you transfer terabyptes to petabytes of data to AWS S3
    • snowmobile
  8. Troubleshooting
    • instance type
    • provisioned IOPs
    • EBS optimized

S3

  1. What’s S3?
    • simple storage service
    • object storage
    • S3 is designed to store as much data as needed with access from anywhere on the internet
    • data is stored in buckets
    • Use Cases:
      • store data from
        • IOT
        • website
        • mobile apps
        • other AWS service
    • S3 Features
      • each bucket has a globally unique URL
      • 11 nines of durability
      • multipart upload
    • S3 storage classes
      • S3 standard access
      • S3 standard infrequent acess (IA)
      • S3 reduced redundancy storage (RRS)
      • glacier
        • retrieval options
        • vaults
  2. Versioning
    • keeping multiple variations of an object in the same bucket
  3. Lifecycle Polices
    • move objects to a different storage class
    • actions:
      • transaction: defines when objects move to a new storage class
      • expiration: defines when an object expires and S3 will automatically delete the specified object or version
  4. Cross-Region Replication
    • enable automatic and asynchronous copies of objects across two buckets in two different regions