Basic Services Flashcards

1
Q

ELB

A
  • region wide
  • can be deployed to multiple AZ
  • internal (private IP) or external
  • capable of sticky sessions
  • integrates with auto scaling
  • health checks for EC2 instances
  • integrated with route53
  • cannot attach an Elastic IP or EIP or public IP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

VPC

A
  • allows to create a virtual network
  • allows to create subnets inside it
  • you need to assign a CIDR block range when creating a new VPC (this cannot be changed i.e. 192.168.0.0/16)

vpc peering

  • cannot have overlapping network addresses
  • limit is 50 vpc peers per vpc (could be raised to 125 by request)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

NAT Gateway

A
  • its a managed service you can use instead of hosting a NAT instance
  • each subnets needs to have one NAT
  • it is HA, available in each AZ
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Subnets

A
  • belongs to a VPC
  • also need to select a AZ where the subnet should reside
  • also takes a CIDR range i.e. 192.168.1.0/24
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Creating a AWS Network

A
  1. Create a new VPC
    CIDR range 192.168.0.0/16
  2. Create subnets
    DMZ - 192.168.1.0/24, AZ1
    DB - 192.168.2.0/24, AZ2
  3. Create Internet Gateway
    By default it is detached from the VPC, you need to attach it to the VPC
  4. Create Route table
    - in the routes, target=igw-id, destination=0.0.0.0/0,
    - attach the route table to the DMZ subnet
    (what ever is put in DMZ will route to internet)

5 Create an Web EC2 instance

  • select DMZ for subnet
  • add an EIP
  1. Create a DB EC2 instance
    - no EIP
    - subnet = DB

At this point you should be able to login to Web instance and ping go out to the internet. But you will not be able to do it from DB instance since its in a private subnet and not natted.

  1. Create a new NAT Gateway
    - add it to the DMZ subnet
    - associate it with a new EIP

8 Create new route table
target=NAT Gateway, destination=0.0.0.0/0, subnet=DB

Now you should be able to route traffic from DB to internet but nothing from outside the VPC can communicate with DB instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Route 53

A

two modes

  1. public hosted zones
  2. private hosted zone
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Placement Groups

A
  • logical grouping of instances in a single AZ
  • cant span multiple AZ
  • name has to unique across AWS accounts (like S3 bucket)
  • provides low latency and high bandwidth
  • only the following ec2 types are supported - c3,
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

S3 Classes

A
  1. standars
  2. Infrequent Access (IA)
  3. reduced redundancy (RR)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

S3 features

A
  • versioning
  • cross region replication
  • permissions scheme
  • time limited access
##Optimize for PUT
- divide file into smaller pieces and upload in parallel

optimizing for GET

  • use Cloud Front - low latency access, cache object
  • range based gets
  • randomize file name to avoid hot sports in storage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Securing S3

A
  • bucket policies

- backup to different bucket

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EBS Volumes

A
  • need not be attached to EC2 instance
  • can only be attached to one instance at a time
  • encrypted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Glacier

A
  • long term retention

- expensive to get data back

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

RDS

A
  • multi AZ deployments
  • can increase instance size, capacity etc
  • its not does not scale automatically as Dynamo db, you have to manually provision stuff
  • its a master slave setup, where both of them are in different AZ
  • multi AZ master slave is not for scaling its for DR
  • read replicas as for scaling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Dynamo DB

A
  • fully managed highly scalable NoSQL database

- automatically replicates data across 3 AZ’s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

CloudTrail v/s CloudWatch

A

CloudTrail
logs every event in AWS

CloudWatch

  • Monitoring service
  • not enabled by default
  • can enable per region
  • can set alarms on metrics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

EC2 instance Costs

A

On Demand

  • pay as you go
  • good for autoscaling loads

Reserved Standard

  • lower hourly rate instances based on yearly commitment
  • good for constant running loads

Reserved Scheduled

  • only reserve for some time of day or day of month.
  • need to schedule it and the capacity will only be available during that time

Spot Instances

  • bid for instances, they can be taken off anytime AWS has higher bid.
  • good for grid computing

Dedicated Hosts

  • runs on physical machine, you have complete visibility on the machine
  • useful for license type scenarios
  • most expensive
  • complete isolation

Dedicated Instances
- same as hosts but you do not have visibility on the type of hardware but it still run on dedicated box.

17
Q

EC2 Instance Family

A
  1. General Purpose
    t2, m3, m4
    These letters specify a similarity with hardware processor. So all t machines will have the same processor so will all m machines.
  2. Compute Optimized
    c3, c4
  3. Memory Optimized
    r3 - ram3
  4. Storage Optimized
    i2, d2
  5. GPU
    g3

====
T2 (small) 1 CPU 2 GB RAM
T2 (XLarge) 4 CPU, 16GB RAM

C5 - Compute Intensive
R4 - Memory Intensive

18
Q

EC2 Instances Types

A

On Demand
- pay by second no upfront cost

Reserved
- pay upfront with discount (1-3 years)

Spot Instances

  • Bid and request instances, no guarantee they will be provided
  • good for large loads

Scheduled Instances
- instances available on schedule (1 year cycle)

Dedicated Instances

  • pay by hour
  • single tenant hardware
  • hardware not shared by others

Dedicated Hosts

  • fully dedicated server
  • can be used for compliance needs i.e. licensing etc
19
Q

Autoscaling

A

Launch Configuration
- describes the template to launch the EC2 instance i.e. AMI, type, SG, Key etc

Autoscaling Groups

  • collection of EC2 instances
  • healthcheck
  • desired capacity
  • scaling plans (ways to scale)
    1. scaling policy
    2. based on a schedule

Scaling Policy Types

  • simple scaling
  • step scaling
20
Q

Setting up ELB

A
  1. ELB
    - external internal
    - select subnets
    - select security group
    - select port http or https 80, 443
    - select health checkcs - port/protocol
  2. Launch Config
    - select AMI
    - select instance type
    - select IAM role
    - key
    - no public ip address since ELB already has one
    - select SG
  3. Autoscaling Group
    - select group size - initial size
    - VPC
    - subnets (public 1, public 2)
    - ELB instance
    - health check from ELB
    - Add Scaling policies
    a. increase group size
    - create alarm - avg CPU > 80 for 5 mins take action of adding 2 instances and then wait for 5 mins
    b. decrease group size
    - create alarm - avg CPU < 50 for 5 mins take action of removing 2 instances and then wait for 5 mins