AWS Associate Solutions Architect Study - ACloud - Guru
AWS Associate Solutions Architect Study - ACloud - Guru
AWS Associate Solutions Architect Study - ACloud - Guru
Guru
Ian Berry 09/07/2019 v1 AWS Associate Solutions Architect Study Notes
Timeline:
AWS certifications
https://aws.amazon.com/certification/certified-solutions-architect-associate/
https://aws.amazon.com/whitepapers/
https://acloud.guru/course/aws-certified-solutions-architect-associate/dashboard
** Need to know VPC’s and IAM sections really well to pass all associate exams (SA, Dev,
SysOps).
S3 FAQ: https://aws.amazon.com/s3/faqs/
Need to know VPC very well to pass all AWS associate exams (ass-architect, ass-dev,
ass-sysops-admin) and need to understand how to build it out from scratch
https://medium.com/@LindaVivah/resources-i-used-to-pass-the-aws-solutions-
architect-associate-certification-exam-1a9807f8d195
https://medium.com/@annamcabee/guide-to-passing-all-3-aws-associate-level-
certifications-73516bcef6e1
16+ Regions, 44+ Availability Zones and 96+ Edge Locations (CDN)
Compute
Storage
Databases
RDS - relational DB
DynamoDB - non relational DB
Elasticache - cache
Redshift - data warehousing / business intelligence
Migration
VPC - networking
Cloudfront - CDN
Route53 - DNS
API Gateway - API’s
Direct Connect - Dedicated network from corporate office / data-centre into AWS
Developer Tools
Management Tools
Media Services
Machine Learning
Analytics
Mobile Services
Application Integration
Customer Engagement
Business Productivity
Alexa For Business - Does a whole bunch of business services like book a meeting
room, log ticket for broken printer etc
Chime - Video conferencing
Work Docs - Store work files
WorkMail - Work email
Desktop & App Streaming
Internet Of Things
Game Development
AWS users have access to the data for seven checks. Users with Business or
Enterprise-level Support can access all checks
Federation (ie Active Directory) via SAML and can use Single Sign On (SSO) - user
doesn’t need to be a user in IAM
Federation with Mobile Apps via OpenID (ie Facebook, Amazon, Google etc)
Cross Account Access
Typical Scenario - User signs in to local system and wants access to their own
Amazon S3 bucket
Can use:
S3 Tiered Storage
Uploading via UI
Specifying the x-amz-storage-class header: <<<tiered_option>>>
Storage
Requests
Storage Management pricing (meta-data)
Data Transfer pricing (cross Region)
Transfer Acceleration (S3 CDN enabled)
S3 Versioning:
Stores all versions of the file (even if you delete, can restore by deleting delete-
marker)
Once enabled, can only be suspended (not removed)
Integrates with lifecycle rules
MFA delete (need MFA to delete for extra security)
S3 Notifications (events)
Receive notifications when certain events happen in your bucket (Create, Update,
Delete, Copy etc) and send to SQS, SNS, Lambda
S3 Lifecycle Management
S3 Inventory
S3 bucket audit report to help manage your files & storage on a daily or weekly
basis available in CSV, ORC or Parquet format
S3 Batch Operations
Cache-Control
Content-Disposition
Content-Encoding
Content-Length
Content-MD5
Content-Type
Expect
Expires
x-amz-meta-
x-amz-storage-class
x-amz-tagging
x-amz-website-redirect-location
x-amz-object-lock-mode
x-amz-object-lock-retain-until-date
x-amz-object-lock-legal-hold
S3 Query In Place
Query your files without having to move them into an analytics platform (or other
out of S3 for processing)
S3 offers multiple query in place options:
S3 Select
Amazon Athena
Amazon Redshift Spectrum
Storage Gateway
A virtual appliance which sits within your own data centre and allows you to store
data in AWS
https://docs.aws.amazon.com/storagegateway/latest/userguide/StorageGatewayC
oncepts.html
4 types of AWS storage gateway
File Gateway (NFS) stores flat files in s3
Volumes Gateway (iSCSI) is block storage (ie a virtual hard disk to run OS,
databases etc) copied asynchronously to S3:
Stored Volumes - All local storage, backed up to S3
Cached Volumes - All data in S3, local data cached in datacenter
Tape Gateway (VTL) to S3 via virtual tapes
Snowball
Was called Import / Export before Snowmobile (you could send in your hard-drive,
no standard format)
Move large amounts of data into AWS using a physical portable storage device for
transport (AWS standard device)
3 different types:
Snowball - storage only
Snowball Edge - storage and compute (AWS data centre in a box)
Snowmobile - Physical truck with shipping container - Petabyte / Exabyte
level storage & transport
Snowball can import to S3 and export from S3
S3 Transfer Acceleration
Upload to CloudFront Edge Network (rather than directly to S3) via a distinct URL
Distinct URL is in the format of https://BucketName.s3-accelerate.amazonaws.com
Can do a speed comparison on all Edge Locations to see how much faster (or
slower) per Region
S3 Static Website
CloudFront
Edge Location - where content is cached (close to user)
Can Read and Write to them
Objects are cached for the life of the TTL (Time to Live)
Can clear cached objects (though charged $$)
Origin - Original files the CDN will distribute, could be S3, EC2, ELB, Route53 or
can cache non AWS hosted websites
Distribution - A collection of edge locations
Web distribution (websites)
RTMP (media streaming, Flash Media protocol)
Time to live (TTL), default is 24 hours, min TTL is 0 hours, max TTL is 365 days
Can use Restrict Viewer Access for private (paid) viewing using Signed URLS or
Signed Cookies
Can use Geo-Restriction to Whitelist or Blacklist Countries
EC2 101
Elastic Compute Cloud (EC2)
On Demand - no commitment
Reserved - capacity reservation (1 or 3 years)
Can move reserved instances across AZ’s, but not across Regions
Can chose Standard Reserved Instance or Convertible Reserved Instances
(exchangeable compute type)
Reserved Instance Marketplace provides an online marketplace to trade their
Reserved Instances with other AWS customers
Types:
Standard Reserved instance - 1 or 3 year commitment, up to 75% off
OnDemand
Zonal RIs provide the benefit of capacity reservation and a discount -
1 or 3 year commitment, up to 54% off OnDemanmd
Regional RIs automatically apply the RI’s discount to instance usage across
AZs and instance sizes in a region (however Regional RIs don’t provide
capacity reservation)
On-Demand Capacity Reservations allow you to reserve capacity for any
duration without a commitment - similar to Reserved Instances without the
discount
Schedule Reserved Instance - Purchase capacity reservations that recur on
a daily, weekly, or monthly basis, with a specified start time and duration, for
a one-year term
Spot - bid on available compute (if terminated by AWS, you will not be charged for
a partial hour. You will be charged full hour if you terminate)
AWS can interrupt spot instances with 2 minute notification; suitable for
fault-tolerant flexible workloads. Charged by the Spot Instance hour, set
every hour.
Can set a "maximum Spot price” and if the Spot price rises above this, your
instance will be reclaimed with a two-minute notification
Cannot use Paid 3rd party AMIs with Spot instances (such as IBM software
packages)
With Spot hibernate, Spot instances will pause and resume around any
interruptions so your workloads can pick up from exactly where they left off
(ensure enough HDD space on EBS Root Volume to store memory (RAM) on
hibernation). You have no control over hibernate stop/start or
hibernate/resume cycles (AWS controlled).
A Spot Fleet allows you to automatically request and manage multiple Spot
instances
EC2 Fleet lets you provision compute capacity across different instance types,
Availability Zones and across On-Demand, Reserved Instances (RI) and Spot
Instances
Cluster Compute Instances (EC2 Cluster Placement Group) combine high compute
resources with a high performance networking for High Performance Compute
(HPC) applications and other demanding network-bound applications - specifically
engineered to provide high performance networking
Inter-instance traffic within the same region can utilize 5 Gbps for single-flow
and up to 100 Gbps for multi-flow traffic. When launched in a placement
group, select EC2 instances can utilize up to 10 Gbps for single-flow traffic
Amazon EC2 allows you to choose between Fixed Performance Instances (e.g. C,
M and R instance families) and Burstable Performance Instances (e.g. T2). T2
instances use CPU credits (accumulated during idle) to use for burst cycles.
Dedicated hosts - physical EC2 server
Uses Xen and Nitro Hypervisors
Limited to running 20 On-Demand instances, 20 Reserved Instances & dynamic #
of Spot Instances within an AWS account (ask for extension to default limit from
AWS support instance request form)
Each EC2 instance type is charged differently and any data transferred within &
between AWS Regions will be charged as Internet Data Transfer on both sides of
transfer
FIGHT DR MC PX
A virtual disk, can only be mounted to one EC2 instance (use EFS for shared)
General Purpose SSD (GP2) use for < 10,000 IOPS
Provisioned IOPS SSD (IO1) use for > 10,000 IOPS
Throughput Optimised HDD (ST1)
Magnetic drive
Cant be a boot volume
Cold HDD (SC1) use for lowest cost
Magnetic drive
Cant be a boot volume
Magnetic (Standard)
Lower cost, only bootable magnetic drive
EBS must be in same AZ as EC2 Instance
Can modify Volumes (size, type) on the fly (without downtime), however not on
older magnetic drives
Can copy a Volume to another Region by creating a Snapshot (Snapshots are
stored on S3 - incremental on update)
Shutdown EC2 instance before taking Snapshot of Root Volume
If taking Snapshot of RAID Array (with application / OS cache):
Stop all applications
Flush all caches to the disk
Unmount RAID array
Shutdown EC2 instances
Take Volume Snapshot
Can copy a Snapshot & Image (AMI) to a different Region
Can create an Image (AMI) from a Snapshot
You can share Snapshots (but only if they’re unencrypted).
EC2 Management
Security Groups
Application Load Balancer - can associate multiple certificates for the same domain to a
secure listener. Supports:
Network Load Balancer only supports RSA certificates with 2K key size. Do not support
RSA certificate key sizes greater than 2K or ECDSA certificates
Elastic IPs
A reserved, static public IPv4 which can be assigned to an EC2 instance, and
automagically re-assigned to another EC2 instance in case of failure
Elastic IPs form a core part of the dynamic cloud and allow you to mask and
recover from failure
Limited to 5 EIP per Region (can ask AWS support for extension)
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html
You can have one Elastic IP (EIP) address associated with a running instance at no
charge. If you associate additional EIPs with that instance, you will be charged for
each additional EIP associated with that instance per hour on a pro rata basis. To
ensure efficient use of Elastic IP addresses, we impose a small hourly charge when
these IP addresses are not associated with a running instance or when they are
associated with a stopped instance or unattached network interface. There is no
charge for Elastic IP addresses you create from an IP address prefix you brought
into AWS using Bring Your Own IP.
CloudWatch
Use Roles to connect to other AWS services rather than storing AWS access keys
(access key ID & secret access key) on EC2 for AWS CLI - works automagically
with correct IAM Roles - no keys required.
Role Type (ie AWS Service Role)
Establish Trust (ie EC2)
Attach Policy (ie permissions)
Roles are global (not Region/AZ based)
EC2 SSH
->$ ssh ec2-user@xxx-ec2-instance-ip -i ~/Documents/AmazonKeys/xxx-you-ssh-key-
xxx.pem
Can run scripts as root when EC2 instance starts to help configure instance. As an
example:
=============
#!/bin/bash
yum update -y
yum install httpd -y
service httpd start
chkconfig httpd on
aws s3 cp s3://mywebsitebucket-acloudguru/index.html /var/www/html
=============
EC2 Metadata
=============
->$ curl http://169.254.169.254/latest/meta-data/
->$ curl http://169.254.169.254/latest/meta-data/reservation-id
=============
https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.ht
ml
https://docs.aws.amazon.com/autoscaling/ec2/userguide/scaling_plan.html
You can only specify one launch configuration for an Auto Scaling group at a time,
and you can't modify a launch configuration after you've created it.
If you want to change the launch configuration for your Auto Scaling group, create
a launch configuration and then update your Auto Scaling group with the new
launch configuration.
New instances are launched using the new configuration parameters, but
existing instances are not affected.
Can setup ASG lifecycle hooks to put instance into a wait state (so you can
perform custom activities) - default wait period is 1 hour
Amazon supports the following auto-scaling policies:
Manual Scaling - Manually attach / detach instances to your ASG
Scheduled Scaling - A schedule allows you to set your own scaling schedule
for predictable load changes
Dynamic scaling:
Target Tracking Scaling Policies - Select a scaling metric and set a
target value
Simple and Step Scaling Policies - Choose scaling metrics and
threshold values for the CloudWatch alarms that trigger the scaling
process
SQS based scaling - In response to changing demand from an
Amazon Simple Queue Service (Amazon SQS) queue
Instance Warm up: Specify the number of seconds that it takes for a newly
launched instance to warm up. Until its specified warm-up time has expired, an
instance is not counted toward the aggregated metrics of the Auto Scaling group.
Cooldown periods: Prevent the initiation of additional scaling activities before the
effects of previous activities are visible. Does not support cooldown periods for
step scaling policies.
Script to setup Apache and create custom index.html from AWS meta-data with instance
details on EC2 instance startup
=============
#!/bin/bash
yum update -y
yum install httpd -y
service httpd start
chkconfig httpd on
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html
Placement Groups are used to keep compute & data very close to each other to
reduce network time
The placement group can only have 7 running instances per Availability Zone
Three types of Placement Groups:
Clustered Placement Group - All instances within one AZ (low network
latency, high network throughput. Only certain instance types allowed).
Spread Placement Group - All instances placed in distinct underlying
hardware, can spread across multiple AZ’s (Only certain instance types
allowed)
Partition Placement Group - All instances placed across logical partitions -
ensuring partitions do not share underlying hardware
Essentially a shared, mounted file server. Storage capacity is elastic, growing &
shrinking automatically and is block based storage
Supports Network File System (NFS)
Data is stored across multiple AZ’s within a single region
Read after Write consistency
Can only mount an EFS on one VPC - however can use VPC peering to share EFS
to other VPCs
Can apply OS user-level, directory level & file-level permissions
https://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes
https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes
Lambda
Function based compute service, don't have to worry about any underlying
hardware, server, OS concerns or scaling
Supports the following 5 programming languages:
Node
Python
Java
Go
.NET
Supports the following Triggers (events):
API Gateway
AWS IoT
Alexa
CloudFront
CloudWatch (Events & Logs)
CodeCommit
Cognito Sync Trigger
DynamoDB
Kinesis
S3
SNS
SQS
Lambda is charged based on:
Number of requests:
First 1m requests free
$0.20 per 1m requests thereafter
Duration
Code execution time rounded to nearest 100ms, dependent on how
much memory you allocate to your function
$0.00001667 for every GB-second
Function cannot execute for longer than 5 minutes
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstance
sConnecting.html#TroubleshootingInstancesConnectionTimeout
If getting EC2 connection timeouts check:
Security Group rules
Route Table Subnet config
Network ACLs Subnet Config
Check local network firewall rules (inbound & outbound) for blocking
port 22 / 3389
Check your instance has public Ip4 address (or Elastic IP)
Check EC2 CPU load (could be overloaded)
AWS Beanstalk
Elastic Beanstalk - quickly deploy and manage applications in the AWS Cloud
without having to learn about the infrastructure that runs those applications
Elastic Beanstalk supports applications developed in Go, Java, .NET, Node.js, PHP,
Python, and Ruby
Elastic Beanstalk supports Docker
To use Elastic Beanstalk, you create an application, upload an application version
in the form of an application source bundle (for example, a Java .war file) to Elastic
Beanstalk, and then provide some information about the application.
Elastic Beanstalk automatically launches an environment and creates and
configures the AWS resources needed to run your code
Great for web server and worker workloads
Elastic Beanstalk uses nginx as the reverse proxy to map your application to your
Elastic Load Balancing load balancer on port 80. Elastic Beanstalk provides a
default nginx configuration that you can either extend or override completely with
your own configuration.
DNS 101
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-
sets-choosing-alias-non-alias.html
Canonical Name (CNAME) - Resolves one domain name to another (i.e.
blah.test.com to boo.test.com), can't be used for naked domain name.
Alias Record (AWS Route53 custom dns extension) - Maps resource record to a
dns name, similar to CNAME and can be used for naked domain names (also
known as Zone Apex). Amazon can change Alias records on the fly (if say an ELB
IP changes) and update Route53 immediately without any changes to the hosted
zone
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-
policy.html
Simple Routing - Single resource
Weighted Routing
Latency-based Routing
Failover Routing - Active/passive failover
Geolocation Routing
Geoproximity Routing
Multivalue Answer Routing - Up to 8 healthy records chosen at random
Simple Routing
Weighted Routing
Latency-based Routing
Route traffic based on lowest network latency for your end user
Multiple A Record specifying Regions and one or many servers in each
Can use VPN to test different Regions and latency
Failover Routing
Create an active / passive setup, good for DR with primary & secondary locations
Route53 will use a health check monitoring to determine if failover required
Create Health Check in Route53 which can monitor:
Endpoint
Status of other health checks
State of CloudWatch alarm
Geolocation Routing & Geoproximity Routing
Route traffic (approx.) randomly across web servers using health checks
Route53 provides different server resolutions to dns resolvers
Allows multiple A record each with their own IP addresses
Databases 101
Relational database
Consist of Database, Collection (i.e Table like), Document (i.e Row like), Key-value
pairs (i.e Field like)
https://aws.amazon.com/nosql/
AWS NoSQL DB:
DynamoDB
Other NoSQL DB's not directly on AWS platform (ie MongoDB, Cassandra,
Couchbase etc)
Data Warehousing
Elasticache
Multi-AZ RDS
For improved performance only (not used for DR), especially in high read
applications you can use RDS Read Replica. Must have Automatic Backup turned
on and can have up to 5 Read Replica copies of a DB
EC2 instances write to a primary RDS instance, and then these writes are
distributed to other replica RDS instances to read from (read-only)
Great way to scale your DB tier. You can have Read Replicas of Read Replicas in
different AZs or Region (will increase latency)
Achieved using Asynchronous replication from primary RDS instance to Read
Replica instance.
You can have Multi-AZ and Read Replicates turned on the same DB
Read Replicas can be promoted to their own DB, however this breaks the
replication
Can create a Route53 weighted routing policy for all read replica DNS URLS
DynamoDB
Fast & flexible fully managed No-SQL DB, document and key-value data models.
Stored on of SSD
Spread across 3 geographically distinct data-centres (multi-region)
Read settings:
Eventual Consistent Reads (best performance) or
Strongly Consistent Reads
Provides ACID transactions
Provides Point in time recovery (up to 35 days)
The combined Value and Name combined fields must not exceed 400 KB.
Pricing:
Write Throughput $0.0065 per hour for 10 units
Read Throughput $0.0065 per hour for 50 units
Storage cost of $0.25GB per month
Can reserve capacity for DynamoDB (1 or 3 years)
Streams https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/S
treams.html
A DynamoDB stream is an ordered flow of information about changes to
items in an Amazon DynamoDB table. When you enable a stream on a table,
DynamoDB captures information about every modification to data items in
the table and stores this information in a log for up to 24 hours
RedShift
Aurora
VPC Diagram
AWS CIDR allowed address range
See www.cidr.xyz for CIDR range calculator
All Subnets in default VPC have a route to the internet (and have a public & private
IP)
VPC allowed block size is between a /16 netmask (65,536 IP addresses) and /28 netmask
(16 IP addresses).
You can add up to four (4) secondary CIDR blocks after creation of the VPC
https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html
Can have multiple VPC’s (up to 5 per account, can extend via AWS support request)
VPC Peering allows you to connect one VPC with another using private IP
addresses
VPC Peering also allows you to connect to other AWS accounts
There is no transitive peering, you must connect each VPC to each other to
communicate - i.e:
Connect two VPCs and route traffic between them using private IP addresses and
Instances appear as if they’re in the same network
Can connect two VPCs within an AWS account or cross AWS accounts within a single
region.
VPC Peering need to use different CIDR ranges when connected (not allowed matching or
overlapping ranges)
Transitive Peering is not supported (so below, VPC A cannot communicate to VPC C)
Tenancy
Creating a Subnet
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html
Created with:
Name: 10.0.1.0 - us-east-1a
AZ: us-east-1a
10.0.1.0/24
If public subnet, click on subnet and select Modify auto-assign public IPv4
addresses
Security Groups do not span VPCs
Note Amazon reserve 5 IP’s from this range for each subnet (first 4, last 1):
Currently you can create 200 subnets per VPC (support request to extend)
The minimum size of a subnet is a /28 (or 14 IP addresses.) for IPv4. Subnets cannot be
larger than the VPC in which they are created.
An IP address assigned to a running instance can only be used again by another instance
once that original running instance is in a “terminated” state (not “stopped” state).
Internet Connectivity
You can use public IP addresses, including Elastic IP addresses (EIPs), to give
instances in the VPC the ability to both directly communicate outbound to the
Internet and to receive unsolicited inbound traffic from the Internet (e.g., web
servers)
Instances without public IP addresses can access the Internet in one of two ways:
Route their traffic through a NAT gateway or a NAT instance to access the
Internet (doesn’t allow machines on the Internet to initiate a connection to
internal instances)
For VPCs with a hardware VPN connection or Direct Connect connection,
instances can route their Internet traffic through their internal data-centre
When using public IPs, traffic between two instances within a Region stays within the
AWS network. When between instances in different Region with inter-region VPC peering
will stay within AWS network however when but not using peering, no guarantee will stay
within AWS network.
Creating a Route
NAT allows private subnets egress traffic (ie allows instances in subnet to get to the
internet), but does not allow any ingress traffic (ie traffic from the internet into the
subnet)
NAT Instances are on their way out, replaced by NAT Gateways
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-
comparison.html
NAT Instances
Are launched like any EC2 instance, using Community AMIs (NAT instance)
Add Instance to your VPC, and into the public subnet
Add a Security Group with SSH, HTTP, HTTPS access (so private subnet can
initiate connections to internet over those protocols)
On NAT Instance, in Networking dropdown, Change Source/Dest. Check to
disable
Each EC2 instance must always be either source or destination of
traffic, NAT Instance are neither!
On your main Route Table, add a Route from 0.0.0.0/0 to your NAT Instance
Problems with NAT Instances
Single point of failure, limited compute capacity & network throughput,
single OS etc. You can setup Auto Scaling Groups, across multiple
AZ’s but gets complicated and you have to manage them all yourself -
this is the benefit of NAT Gateway
Can use as Bastion Server and setup Port Forwarding
NAT Gateways:
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html
Network Access Control List adds an extra layer of security to your VPC and acts
as a firewall for controlling traffic in/out of your subnets. Can Allow or Deny
INGRESS and EGRESS traffic.
A default NACL is created for your VPC, allowing all INGRESS & EGRESS traffic
NACL’s operate and are applied at a Subnet level (but do not filter traffic between
instances within a subnet)
Can create many NACL's per VPC, which default to denying all INGRESS &
EGRESS traffic
Can only associate a subnet with a single NACL, however a NACL can be
associated with many subnets
NACLs are stateless, you must specify INGRESS and EGRESS rules for every
network connection
For NACL Rules, start at Rule #100, and increment each Rule# by 100 (ie Rule#100:
HTTP; Rule#200 HTTPS; Rule#300 SSH etc)
Rules are applied in numerical order (earlier deny rules take precedent)
NACL rules are applied BEFORE Security Groups
Can block IP ranges with NACL
For EGRESS, add Ephemeral Port rules:
Custom TCP Rule; Allow; Port Range 1024-65535
https://en.wikipedia.org/wiki/Ephemeral_port
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-
acls.html#nacl-ephemeral-ports
Short lived transport protocol (ie TCP/UDP) port that is specified by the client
OS, so the remote server (well known port) can communicate back to the
client. As an example for ssh connection might look like:
192.168.1.102:37852 ---> 192.168.1.105:22
Capture information about the IP traffic to network interfaces within in your VPC,
stored within CloudWatch
Flow logs can be created at 3 levels:
VPC
Subnet
Network Interface Level
Need to setup Flog Log IAM role
Need to setup CloudWatch log group
Can stream events to Lambda (react in real-time)
Can stream events to Elasticache
Can export logs to S3
Cannot enable VPC Flow Logs on peered VPC accounts (VPC must be in your
AWS account)
Cant tag a Flow Log
Cant change configuration (i.e. IAM role) after created
Not all IP traffic is monitored i.e.:
AWS DNS server traffic (your own DNS server is logged)
Windows instances for Amazon Windows license activation
Traffic to/from Amazon Metadata (i.e. 169.254.169.254)
Traffic to the reserved IP address for the default VPC router
Public exposed instances setup to securely access your internal AWS network for
admin (i.e. using SSH or RDP).
Highly secure / locked down instance
Normally accessed via VPN / secure channel
Can setup highly available Bastion servers using Auto-Scaling-Groups, two public
subnets / AZ’s and use Route53 health checks
As an example, If you setup a VPC Endpoint to S3 from a private subnet, you no longer
need corresponding NAT Gateway to access S3
You can now setup your application as accessible over a AWS Private Link / VPC
endpoint, other consumers can connect their VPC to your via a VPC endpoint
Direct Connect
Establishes a dedicated private network connection from your on premises data-centre to
AWS
Improves network performance and can reduce network costs (over internet based VPN
costs) for large volumes of data. Available in:
10Gbps
1Gbps
Sub 1 Gbps through Direct Connect partners
Uses Ethernet VLAN trunking (802.1Q)
VPN Connections can be configured quickly and provide modest performance over the
public Internet
vs.
Direct Connect does not use the internet; but a private dedicated network connection
direct to AWS. Can take 1 to 4+ months to setup dedicated network.
For Direct Connect, your Data Centre connects via a dedicated line (provided by your
telco - ie Telstra / Optus etc) to a Direct Connect facility, which has a Dark Fibre
connection into the AWS Data Centre/ backbone/network.
VPN
AWS VPN is comprised of two services:
AWS Site-to-Site VPN - connect your on-premises network or branch office site to
your Amazon Virtual Private Cloud (Amazon VPC)
AWS Client VPN - connect users to AWS or on-premises networks.
AWS Site-to-Site VPN
Customer Gateway is on the customers side
Virtual Private Gateway is the Amazon side of a VPN connection
An AWS Site-to-Site VPN connection connects your datacenter to Amazon VPC, Amazon
supports Internet Protocol Security (IPSec). An internet gateway is not required to
establish an AWS Site-to-Site VPN connection. To use this service, you must have an
internet-routable IP address to use as the endpoint for the IPsec tunnels connecting your
customer gateway to the virtual private gateway. If a firewall is in place between the
internet and your gateway, the rules in the following tables must be in place to establish
the IPsec tunnels.
Five virtual private gateways per AWS account per AWS Region
Fifty customer gateways per AWS account per AWS Region
Ten IPsec VPN Connections per virtual private gateway
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario4.html
VPC with a Private Subnet Only and AWS Site-to-Site VPN Access
SQS Long Polling is a way to retrieve Messages where a request to the Message Queue
doesn’t respond immediately, but waits until a Message arrives in the Queue (or the Long
Poll times out). Long Polling can save you money. Set Receive Message Wait Time or
WaitTimeSeconds to setup Long Polling
Two different types of queues
SWF Domains is a scoped context (isolated) which contains your workflow, tasks &
executions; Workers & Deciders.
Workflow Starters - An application which initiates a workflow
Decider is a program that controls the coordination of tasks (ordering, concurrency
and scheduling)
Activity Workers are programs which interacts with SWF to get tasks, process and
return results
Workers and Decider can run on AWS or your remote data centre (internal machines
behind firewall) compute and SWF stores tasks, assigns to Worker, monitors progress and
ensures a task is assigned once (and never duplicated) - SWF maintains the applications
state durably
Elastic Transcoder
Media transcoder in the cloud; converts media files from original source to a different
format to play on other devices / channels
Supports popular output formats
Pay based on minutes that you transcode and the resolution you transcode
API Gateway
AWS fully managed API Gateway to publish, maintain, monitor and secure APIs at scale
Supports API caching based on TTL period (in seconds)
Fully scalable, low cost
Can throttle requests
Can connect to CloudWatch and log traffic
Supports client-side COR configuration for same-origin-policy relaxation - enable CORS in
API Gateway
Kinesis 101
Streaming data is data that is generated continuously by thousands of data sources,
simultaneously and in small sizes (KBs) - think online stores, stock prices, online game
data, social network data, geospatial data, IoT data etc
Kinesis is an AWS platform to send streaming data too, enabling easy load and analysis of
streams of data. Three core Kinesis Services:
Kinesis Streams
Producers are data producers / sources like EC2, Mobile device, desktop
web, games, IoT devices etc
Data is stored in a Shard by default for 24 hours, and up to 7 days
Supports 5 transactions per second for reads, up to 2MB read rate per
second
Supports up to 1000 records per second for write, up to 1MB write
rate per second
Can have multiple Shards per Stream
Consumers (EC2 instances) subscribe to a Shard and consume data,
analyse and stored if required (i.e. in DynamoDB, S3, EMR, Redshift etc)
Kinesis Firehose
Have Producers, but you don’t have to worry about Shards or Streams.
Scaling is automated, can analyse incoming data via Lambda and send to
S3
Does not support data storage/retention like Streams. Can send to S3 and
Redshift (via S3) or ElasticSearch Cluster
Kinesis Analytics
Run SQL queries on Streams and Firehouse, and can store data into S3,
Redshift, Elasticsearch Cluster
AWS Organisations
Enables you to manage and group multiple AWS accounts into a single view to centrally
manage. Has two feature sets:
Consolidated Billing
All Features
Apply Policies to Root AWS account and apply to all AWS accounts
To delegate permission to access a resource, create an IAM role that has two
policies attached (within Trusting Account):
The permissions policy grants the user of the role the needed permissions to
carry out the desired tasks on the resource.
The trust policy specifies which trusted accounts are allowed to grant its
users permissions to assume the role
The other half is a permissions policy attached to the user in the trusted account
that allows that user to switch to, or assume the role.
With Systems Manager you can see Insights / Compliance / Inventory and Execute
Automation Steps on group resources
Workspaces
Virtual Desktop Infrastructure
Replaces local PC with cloud-based PC/services such as compute, storage, operating
system & applications
Connect to your VDI via a local (dumb) device such as PC, Tablet etc
Can use Workspace credentials or ActiveDirectory credentials to login (you do not need
an AWS account to login to Workspaces)
Runs Windows 7 experience on top of Windows Server 2008 R2
By default, users are given local admin access to install their own applications
Workspaces are persistent and users can personalise
All data on D:\ drive is back-up every 12 hours
ECS
Elastic Container Service
Build, test & deploy applications in a standardised way using Containers
A standard for packing & versioning a applications code, configuration and dependencies
into a single deployable unit
Docker Components
ECS is a highly scalable, fast container management system, running on top of a cluster of
EC2 instances.
ECS is a Region based service aiding in management of Docker based applications (don't
have to worry about cluster management, configuration management or scaling)
Elastic Container Registry (ECR) is a private, managed Docker Registry to store your
Docker Images / Layers
Amazon ECS Container Agent allows Docker Containers instances to connect to your
cluster.
Runs on all ECS optimised AMI’s, but you can install on any EC2 instances which
supports the ECS specification
Will not work with Windows
ECS Tasks use an IAM role to access AWS services & resources
Security Groups attached at the ECS Instance-level
EC2 instances use IAM roles to access ECS
You an access the underlying OS on the EC2 instance running your ECS cluster
Service Scheduler
Custom Scheduler
Well Architected Framework
AWS Service Limits
https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html
AWS Training - Exam Readiness: AWS Certified
Solutions Architect - Associate
Module 1 - Design Resilient Architectures
EC2: https://aws.amazon.com/ec2/faqs/
VPC: https://aws.amazon.com/vpc/faqs/
VPN: https://aws.amazon.com/vpn/faqs/
S3: https://aws.amazon.com/s3/faqs/
ELB: https://aws.amazon.com/elasticloadbalancing/faqs/
SQS: https://aws.amazon.com/sqs/faqs/
IAM: https://aws.amazon.com/iam/faqs/
Lambda: https://aws.amazon.com/lambda/faqs/
RDS: https://aws.amazon.com/rds/faqs/
DynamoDB: https://aws.amazon.com/dynamodb/faqs/
AWS Whitepapers
Overview of Security Processes: https://aws.amazon.com/whitepapers/overview-
of-security-processes/
Architecting for the Cloud: https://aws.amazon.com/whitepapers/architecting-for-
the-aws-cloud-best-practices/
https://d0.awsstatic.com/whitepapers/AWS_Cloud_Best_Practices.pdf
AWS Well Architected
Framework: https://d1.awsstatic.com/whitepapers/architecture/AWS_Well-
Architected_Framework.pdf
AWS Storage Service Options: https://aws.amazon.com/whitepapers/storage-
options-aws-cloud/
Building Fault Tolerant Apps: https://d0.awsstatic.com/whitepapers/aws-building-
fault-tolerant-applications.pdf
Glossary / Terms
Redundancy: Available in two or more places
Durability: Data survivability - storing for a long time with no corruption or loss
Reliability: Consistently perform according to its specifications
Availability: System / Service uptime
RTO: Recovery Time Objective - how long to restore service
RPO: Recovery Point Objective - how much data loss is acceptable, in what point in time
can we restore too
TODO:
Study
Finish reading notes
Finish reading AWS FAQs & AWS White Papers
Review ACloudGuru forums for exam tips
Review AWS Cheat Sheets: https://tutorialsdojo.com/aws-cheat-sheets/
Complete ACloudGuru exercise/setup for public/private VPC
Sit ACloudGuru exam
Sit Multiple WizLabs practice exams
Complete AWS exam readiness
course: https://www.aws.training/training/schedule?courseId=10006
Book AWS exam