Compute Flashcards
Instance Types
M=General Purpose
C=Compute Optimised
R=Memory Optimised
Security Groups Default Traffic Rules?
By default, SGs can access all traffic going out and no traffic coming in. you can not specify deny rules, only allow rules. THere is a DEFAULT SG called ‘default’ which cannot be deleted
Reserved v Convertable Reserved EC2 Puchase Plans
Reserved = 1yr or 3yr. 72% discount. Fixed instance type/os.
Upfront/Partial upfront or neither.
Convertible Reserved = allow change of instance types, family, tenancy etc.
Savings Plan. 1 or 3yr - commit to amount of money per hour.
Dedicated Host v Dedicated Instance EC2 Puchase Type
Dedicated Hosts - A dedicated physical host for you that doesnt change. For compliance and licensing needs.
Dedicated Instance - hardware dedicated to you but may share with other instances for same account. Hardware can change after a start/stop.
EC2 Capacity Reservation
Reserve capacity in specific region. Charged on Demand rate whether you run instances or not. Suitable for short term uninteruptable workloads that must be in a specific AZ.
Are AMIs region or global?
REGION Specific. They can be copied across region but cant launch an instance in Region A using an AMI stored in Region B.
ALB Layer?
ALB is on Layer 7. It uses Target Groups to identify hosts.
What Target Groups can an ALB be ?
When you create a Target Group, you specify what Target Types it uses. Once created, you cant change Target Type
Instances (E2 or ECS)
Lambda Functions
Private IP Address
What Target Groups can an NLB be ?
NLB (Layer 4), can handle millions request per second (100ms). It can have ONE static IP per AZ.
Target Groups can be EC2 and Private IP only. Only needs ONE subnet.
For exam, if you see extreme performance TCP, UDP or Static IP - think NLB
ASG Scaling Policies
Target Tracking (Metrics cpu /mem)
Simple/Step Scaling (CloudWatch)
Scheduled (Time Based)
Predictive (Historic Data)
Scaling Cooldown
Default Cooldown is 300 seconds. No new instances will launch or terminate during this period.
Default NACL rules
NACL is STATELESS first level of defense at SUBNET level. Default NACL allows ALL inbound AND outbound traffic through. NACL can both ALLOW and DENY traffic at IP Address level.
Newly created ACL denies all inbound and outbound traffic.
How to connect two VPCs together
VPC PEERING
A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. Instances in either VPC can communicate with each other as if they are within the same network.
How do you ensure users go to same Target when using ELB when they are using credentials or state to ensure they don’t have to log in each time
using Sticky Sessions in the ELB.
what LB should you use for TCP and UDP protocols.?
network
Can ALB route traffic based on geographical location?
NO.
Application Load Balancers can route traffic based on the hostname, request URL path, and other factors but cannot route based on the client’s geographical location, which requires services like Amazon Route 53
Which LBs can you attatch a static fixed IP address to.?
Network Load Balancer has one static IP address per AZ and you can attach an Elastic IP address to it.
Application Load Balancers and Classic Load Balancers have a static DNS name.
Is Cross Zone LB enabled by default?x
For ALB it is ENABLE.
For NLB it is disabled by default
Which feature in both Application Load Balancers and Network Load Balancers allows you to load multiple SSL certificates on one listener?
SNI - Server Name Indication
Server Name Indication (SNI) allows you to expose multiple HTTPS applications each with its own SSL certificate on the same listener
Do you pay for cross AZ LBs?
For ALB, cross zone is enabled by default and its free.
FOr NLB, its disabled but you pay if switched on.
what happens to a container if you terminated it in ECS whilst in RUNNING state ?
that container instance is automatically removed, or deregistered, from the cluster.
what happens to a container if you terminated it in ECS whilst in STOPPED state ?
that container instance isn’t automatically removed from the cluster. You will need to deregister your container instance in the STOPPED state by using the Amazon ECS console or AWS Command Line Interface. Once deregistered, the container instance will no longer appear as a resource in your Amazon ECS cluster.