Udemy Course Flashcards

1
Q

What is the Recycle Bin?

A

A recycle bin for EBS Snapshots and AMIs

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

ALBs can route traffic to different Target Groups based on which 4 things?

A
  • URL Path
  • Hostname
  • HTTP Headers
  • Query Strings
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

True or False; You can attach an Elastic IP address to Application Load Balancers?

A

False

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

What cookie names are reserved by the ELB (3)?

A
  • AWSALB
  • AWSALBAPP
  • AWSALBTG
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Server Name Indication (SNI)?

A

Server Name Indication (SNI) allows you to expose multiple HTTPS applications each with its own SSL certificate on the same listener.

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

What is the maximum number of Read Replicas you can add in an ElastiCache Redis Cluster with Cluster-Mode Disabled?

A

5

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

EBS Volumes are network drives or physical drives?

A

Network drives

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

True or False; EBS volumes are locked to an Availability Zone?

A

True

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

True or False; EBS volumes have a provisioned capactiy?

A

True

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

True or False; you can attach multiple EBS volumes to an EC2 instance?

A

True

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

What happens by default to EBS volumes attached to an EC2 instance, when the EC2 instance is terminated?

A

By default:
- the root EBS volume is deleted
- any other attached EBS volume is not deleted

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

True or False; EBS snapshots can be copied across AZs and Regions?

A

True

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

How much cheaper are EBS snapshots stored in the ‘archive tier’?

A

75%

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

How long do EBS snapshots in the archive tier take to be restored?

A

24 - 72 hours

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

Is it possible to retain deleted EBS snapshots?

A

Yes, in the recycle bin

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

How do you quickly restore an EBS snapshot?

A

Use Fast Snapshot Restore (FSR)

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

True or False; AMI can be used in any region?

A

False; they are region specific, but can be copied across regions

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

What type of disk to use with an EC2 instance if you require high-performance?

A

EC2 Instance Store

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

What are io1 / io2 (Provisioned IOPS) EBS Volumes best used for?

A

Highest performance SSD volume for mission-critical low-latency or high-throughput workloads

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

What is st1 (Throughput optimised) EBS Volumes used for?

A

Low cost HDD volume designed for frequently accessed, throughput-intensive workload

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

What is sc1 (Cold HDD) EBS Volumes used for?

A

Lowest cost HDD volume designed for less frequently accessed workloads

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

What EBS volumes can be used as boot volumes?

A

gp2/gp3 and io1/io2 only

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

Volume size of EBS volume gp2/gp3?

A

1GB - 16TB

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

gp3 baseline IOPS and throughput?

A

3000 IOPS and 125MB throughput

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

gp3 max IOPS and throughput?

A

16,000 IOPS and 1,000 MB throughput

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

True or False; gp3 IOPS and throughput can be scaled independently?

A

True

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

gp2 max IOPS?

A

16,000

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

True or False; gp2 size of volume and IOPS are linked?

A

True

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

gp2 how many IOPS do you get per GB of volume?

A

3

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

io1/io2 volume size?

A

4GB - 16TB

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

io1/io2 max PIOPS?

A

64,000 for Nitro EC2 instances and 32,000 for other

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

True or False; io1/io2 PIOPS and storage size are linked?

A

False

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

io2 Block Express (EBS volume) volume size?

A

4GB - 64TB

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

Which EBS volume types support Multi-Attach?

A

io1/io2 family

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

io2 Block Express (EBS volume) latency?

A

sub-millisecond latency

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

io2 Block Express (EBS volume) max PIOPS and IOPS ratio?

A

Max PIOPS = 256,000 with an IOPS:GB ratio of 1,000:1

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

st1 use cases?

A
  • Big data warehouses
  • Log processing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

st1 volume size

A

500GB - 15TB

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

sc1 volume size?

A

500GB - 15TB

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

sc1 use cases?

A
  • Data that is infrequently accessed
  • scenarios where lowest cost is important
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

st1 max IOPS and throughput?

A

500 IOPS and 500 MB throughput

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

sc1 max IOPS and throughput?

A

250 IOPS and 250 MB throughput

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

What is EBS multi-attach?

A
  • Attach the same EBS volume to multiple EC2 instances in the same AZ
  • Each instance has full read & write permissions to the high-performance volume
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

How many EC2 instances can you attach to an EBS multi-attach volume at a time?

A

Up to 16 instances

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

What file system must you use for EBS multi-attach?

A

A file system that’s cluster-aware (not XFS, EX4, etc)

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

What is EFS (Elastic File System)?

A

A managed NFS (network file system) that can be mounted on many EC2 instances

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

4 EFS use cases?

A
  • content management
  • web serving
  • data sharing
  • wordpress
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

What protocol does EFS use?

A

NFSv4.1

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

How is EFS access controlled?

A

Through security groups

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

What AMIs is EFS compatible with?

A

Linux based AMIs, not windows based AMIs

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

True or False; EFS requires capacity planning?

A

False; it scales automatically and is pay-per-use

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

What can EFS scale to?

A
  • 1,000s of concurrent NFS clients with 10 GB / s throughput
  • Petabytes-scale
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

What 2 modes does EFS have?

A
  • Performance mode (set at EFS creation time)
  • Throughput mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

What are the two EFS performance modes?

A
  • General purpose (default): latency-sensitive use cases
  • Max I/O: higher latency, throughput, highly parallel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

What are the two EFS throughput modes?

A
  • Bursting (1TB = 50MB + burst of up to 100 MBs)
  • Provisioned: set your throughput regardless of storage size
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

What are the two EFS storage tiers?

A
  • Standard: for frequently accessed files
  • Infrequent Access: cost to retrieve files, lower price to storage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

What are the 2 availability options for EFS?

A
  • Standard: which is Multi-AZ
  • One Zone: Single AZ
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

What are load balancers?

A

Load Balancers are servers that forward traffic to multiple servers (e.g., EC2 instances) downstream

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

What are Elastic Load Balancer health checks run against?

A

On a port and a route

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

What is an unhealthy response to an Elastic Load Balancers health check?

A

Any response that is not 200 (OK)

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

What are the 4 kinds of AWS managed Load Balancers?

A
  • Classic Load Balancer (depreciated) (CLB)
  • Application Load Balancer (ALB)
  • Network Load Balancer (NLB)
  • Gateway Load Balancer (GWLB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

3 protocols used by ALB?

A
  • HTTP
  • HTTPs
  • Websockets
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

3 protocols used by NLB?

A
  • TCP
  • TLS
  • UDP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

What layer does the GWLB operate at?

A

Layer 3 (Network Layer)

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

3 different routing rules that ALB can use to route traffic to different target groups?

A
  • Routing based on path in URL (example.com/users & example.com/posts)
  • Routing based on hostname in URL (one.example.com & other.example.com)
  • Routing based on Query String, Headers (example.com/users?id=123&order=false)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

True or False; ALB has a port mapping feature to redirect to a dynamic port in ECS

A

True

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

4 types of ALB target groups?

A
  • EC2 instances
  • ECS tasks
  • Lambda functions
  • IP addresses (must be private IP addresses)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

True or False; ALBs can route to multiple target groups?

A

True

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

At what level are ALB health checks performed?

A

At the target group level

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

How many requests per second can NLBs handle?

A

millions

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

What is the latency of NLB?

A

~ 100 ms

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

Does NLB have any static IPs?

A

Yes, 1 per AZ

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

Which type of ELB supports assigning Elastic IP?

A

NLB

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

3 types of NLB target groups?

A
  • EC2 instances
  • IP addresses (must be private IP addresses)
  • Application Load Balancer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

What is the the Gateway Load Balancer used for?

A

Analyse network traffic. It allows you to deploy, scale and manage a fleet of 3rd party network virtual appliances in AWS

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

What layer does the GWLB operate at?

A

Layer 3 - Network Layer (IP Packets)

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

What 2 functions does the GWLB combine?

A
  • Transparent Network Gateway (single entry/exit for all traffic)
  • Load Balancer (distributes traffic to your virtual appliances)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

What protocol and port does GWLB use?

A

GENEVE protocol on port 6081

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

What are the GWLB target groups?

A
  • EC2 instances
  • IP addresses (must be private IPs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

Which load balancer allows Sticky Sessions?

A

ALB

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

How does the ELB enable Sticky Sessions?

A

By using cookies, which have an expiration date you control

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

What is the use case for sticky sessions?

A

Making sure that the user doesn’t lose his session data

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

What is a potential issue of enabling stickiness on an ELB?

A

It may bring imbalance to the load over the backend EC2 instances

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

What sticky session cookie names can’t be used (reserved for use by ELB)?

A
  • AWSALB
  • AWSALBAPP
  • AWSALBTG
  • AWSELB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q

What does Cross Zone Load Balancing do on an Elastic Load Balancer?

A

It distributes the balance evenly across all registered instances in all AZs

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

For Cross-Zone Load Balancing on Elastic Load Balancers, which load balancers have it enabled by default, and which charge for inter AZ data?

A

ALB:
- Enabled by default
- No charges for inter AZ data

NLB & GWLB:
- Disabled by default
- Charges for inter AZ data if enabled

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

What does an SSL certificate do?

A

It allows traffic between your client and your load balancer to be encrypted in transit (in-flight encryption)

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

What do SSL and TLS stand for?

A

Secure Sockets Layer and Transport Layer Security

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

Who issues public SSL certificates?

A

Certificate Authorities (CA)

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

What type of SSL certificate does a load balancer use?

A

X.509 certificate

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

What does Server Name Indication (SNI) do for Load Balancers?

A

It solves the problem of loading multiple SSL certificates onto one web server (to serve multiple websites)

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

How does SNI (Server Name Indication) work?

A
  • It requires the client to indicate the hostname of the target server in the initial SSL handshake.
  • The server will then find the correct certificate, or return the default one
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
93
Q

What is Deregistration Delay?

A

The time to complete “in-flight requests” while the instance is de-registering or unhealthy

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

True or False; ELBs can check the health of your EC2 instances?

A

True

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

3 Auto Scaling Group Attributes

A
  • Launch Template
  • Min Size / Max Size / Initial Capacity
  • Scaling Policies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
96
Q

8 attributes of an ASG Launch Template

A
  • AMI + Instance Type
  • EC2 User Data
  • EBS Volumes
  • Security Groups
  • SSH Key Pair
  • IAM Roles for your EC2 Instances
  • Network + Subnets Information
  • Load Balancer Information
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
97
Q

True or False; it is possible to scale an ASG based on CloudWatch alarms?

A

True, an alarm monitors a metric (such as Average CPU, or a custom metric)

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

4 good metrics to scale an ASG on?

A
  • CPUUtilisation - Average CPU utilisation across your instances
  • RequestCountPerTarget - to make sure the number of requests per EC2 instance is stable
  • Average Network In / Out - if your application is network bound)
  • Any custom metric - that you push using CloudWatch
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
99
Q

True or False; with RDS you can SSH into your instances?

A

False, it is a managed service

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

What is RDS - Storage Auto Scaling?

A
  • Help you instance storage on your RDS DB instance dynamically
  • When RDS detects you are running out of free storage, it scales automatically
  • Avoids manually scaling your database storage
  • You have to set the Maximum Storage Threshold (max limit for DB storage)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
101
Q

What are RDS read replica’s purpose?

A

Read Scalability

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

True or False; RDS read replicas are within the same AZ?

A

False; can be within the same AZ, Cross AZ or Cross Region

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

RDS read replicas use synchronous replication?

A

False, they use Asynchronous replication, so reads are eventually consistent

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

True or False; RDS read replicas can be promoted to their own DB?

A

True

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

True or False; for RDS DBs, applications must update the connection string to leverage read replicas?

A

True

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

For RDS Read Replicas, is there a network costs when data is replicated to the read replicas?

A
  • Same region replication is free
  • Cross region replication is NOT free
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
107
Q

What is the reason to use RDS Multi-AZ?

A

Disaster Recovery

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

What type of replication does RDS Multi-AZ use?

A

Synchronous replication

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

True or False; RDS Multi-AZ uses multiple DNS names?

A

False; it uses one DNS name, with automatic app failover to standby

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

True or False; you can change an RDS database from single to multi-AZ with zero downtime?

A

True; it does this through via taking a snapshot and synchronisation

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

How does Aurora storage grow?

A

Automatically, in increments of 10GB

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

Aurora maximum storage size?

A

128 TB

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

How many read replicas can Aurora have?

A

15

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

How fast is failover in Aurora?

A

Instantaneous

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

How does Aurora achieve high availability?

A
  • 6 copies of your data across 3 AZs
    – 4 copies out of 6 needed for writes
    – 3 copies out of 6 needed for reads
    – Self healing with peer-to-peer replication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
116
Q

True or False; Aurora uses a shared storage volume?

A

True

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

True or False; Aurora reader endpoint performs connection load balancing?

A

True

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

What does the ‘Backtrack’ feature of Aurora do?

A

Restores data at any point of time without using backups

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

How are RDS DBs encrypted at-rest?

A
  • Database master & replicas encryption using AWS KMS - must be defined at launch time
  • If the master is not encrypted, the read replicas cannot be encrypted
  • To encrypt an un-encrypted database, go through a DB snapshot and restore as encrypted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
120
Q

How are RDS DBs encrypted in-flight?

A

RDS DBs are TLS-ready by default, use the AWS TLS root certificates client-side

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

What are caches?

A
  • Caches are in-memory databases with really high performance, low latency
  • Helps reduce the load of database for read intensive workloads
  • Help make your application stateless
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
122
Q

True or False; using ElastiCache doesn’t require an application code changes?

A

False; ElastiCache involves heavy application code changes

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

ElastiCache - REDIS or MEMCACHED.

Multi-AZ with Auto-Failover?

A

Redis

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

ElastiCache - REDIS or MEMCACHED.

Multi-node for partitioning of data (sharding)?

A

Memecached

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

ElastiCache - REDIS or MEMCACHED.

Read Replicas to scale reads and have high availability?

A

Redis

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

ElastiCache - REDIS or MEMCACHED.

No high availability?

A

Memcached

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

ElastiCache - REDIS or MEMCACHED.

Data Durability using AOF persistence?

A

Redis

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

ElastiCache - REDIS or MEMCACHED.

Non persistent?

A

Memcached

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

ElastiCache - REDIS or MEMCACHED.

No backup or restore?

A

Memcached

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

ElastiCache - REDIS or MEMCACHED.

Backup and restore features?

A

Redis

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

ElastiCache - REDIS or MEMCACHED.

Multi-threaded architecture?

A

Memcached

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

For ElastiCache, what is Lazy Loading / Cache-Asaide / Lazy Population?

A

Cache is checked first, if cache hit, data is returned. If cache miss, data is read from the database and written to cache

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

Pros and Cons of Lazy Loading / Cache-Aside / Lazy Population for ElastiCace?

A

Pros:
- Only requested data is cached (the cache isn’t filled up with unused data)
- Node failures are not fatal (just increased latency to warm the cache)

Cons:
- Cache miss penalty that results in 3 round trips, noticeable delay for that request
- Stale data: data can be updated in the database and outdated in the cache

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

For ElastiCache what is Write Through?

A

Add or Update the cache whenever the database is updated

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

Pros and Cons of Write Through for ElastiCache?

A

Pros:
- Data in cache is never stale
- Reads are quick
- Write penalty vs read penalty (each write requires 2 calls)

Cons:
- Missing Data until it is added / updated in the DB. Mitigation is to implement Lazy Loading strategy as well
- Cache churn - a lot of the data will never be read

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

3 ways cache evictions can occur?

A
  • You delete the item explicitly in the cache
  • Item is evicted because the memory is full and it’s not recently used (LRU)
  • You set an item time-to-live (TTL)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
137
Q

What is ElastiCache replication: Cluster Mode Disabled?

A
  • One shard, all nodes have all the data
  • One primary node, up to 5 replicas
  • Asynchronous replication
  • Primary node is used for read/write
  • Other nodes are read-only
  • Multi-AZ enabled by default for failover
  • Helpful to scale read performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
138
Q

What is ElastiCache replication: Cluster Mode Enabled?

A
  • Data is partitioned across shards
  • Each shard has a primary and up to 5 replica nodes
  • Multi-AZ capability
  • Up to 500 nodes per cluster
  • Helpful to scale writes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
139
Q

What is DNS?

A

Domain Name System, it translates the human friendly hostnames into the machine IP addresses

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

What is a Zone File?

A

Contains DNS records

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

What is a Name Server?

A

Resolves DNS queries

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

What is Route 53?

A
  • A highly available, scalable, fully managed and Authoritative DNS
  • Also a Domain Registrar
  • Has the ability to check the health of your resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
143
Q

What is the ‘A’ record type?

A

Maps a hostname to IPv4

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

What is the ‘AAAA’ record type?

A

Maps a hostname to IPv6

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

What is a CNAME record?

A

It maps a hostname to another hostname

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

What are the requirements for a CNAME record?

A
  • The target is a domain which must have an A or AAAA record
  • Can’t create a CNAME record for the top node of a DNS namespace (Zone Apex), eg, example.com
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
147
Q

What are NS records?

A

Name Servers for the Hosted Zone - control how traffic is routed for a domain

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

What is a Hosted Zone?

A

A container for records that define how to route traffic to a domain and its subdomains

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

True or False; in Route 53, TTL is mandatory for each DNS record

A

True, except for Alias records

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

Route 53; what is the difference between a CNAME and Alias?

A

CNAME:
- Point a hostname to any other hostname (app.mydomain.com => blabla.anything.com)
- ONLY FOR NON ROOT DOMAIN (aka. something.mydomain.com)

Alias:
- Points a hostname to an AWS Resource (app.mydomain.com => blabla.amazonaws.com)
- WORKS for ROOT DOMAIN and NON ROOT DOMAIN (aka mydomain.com)
- Free of charge
- Native health check

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

What do Route 53 Alias Records do?

A
  • Maps a hostname to an AWS resource
  • Always of type A/AAAA for AWS resource
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
152
Q

What is the default TTL for Route 53 Alias records?

A

Alias records have no TTL

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

8 Route 53 Alias Records targets?

A
  • ELBs
  • CloudFront Distributions
  • API Gateway
  • Elastic Beanstalk environments
  • S3 Websites
  • VPC Interface Endpoints
  • Global Accelerator
  • Route 53 record in the same hosted zone
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
154
Q

True or False; you can set an ALIAS record for an EC2 DNS name?

A

False

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

What are Route 53 Routing Policies?

A
  • Define how Route 53 responds to DNS queries
  • DNS does not route traffic, it only responds to the DNS queries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
156
Q

7 Route 53 routing policies?

A
  • Simple
  • Weighted
  • Failover
  • Latency based
  • Geolocation
  • Geoproximity
  • Multi-Value answer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
157
Q

What is Route 53 simple routing?

A
  • Typically routes traffic to a single resource
  • Can specify multiple values in the same record, in which case a random one is chosen by the client
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
158
Q

True or False; Route 53 simple routing can be associated with health checks?

A

False

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

True or False; Route 53 weighted routing can be associated with health checks?

A

True

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

True or False; Route 53 latency-based routing can be associated with health checks?

A

True, has a failover capability

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

True or False; Route 53 HTTP health checks are for public and private resources?

A

False; for public resources only

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

True or False; Route 53 Health Checks enable automated DNS failover?

A

True

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

3 type of Route 53 Health checks?

A
  • Health checks that monitor an endpoint
  • Health checks that monitor other health checks
  • Health checks that monitor CloudWatch Alarms
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
164
Q

How do Route 53 Health checks work?

A
  • About 15 global health checkers will checker the endpoint health
  • Healthy / unhealthy threshold is 3 (default)
  • If > 18% of health checkers report the endpoint is healthy, Route 53 considers it Healthy, otherwise, it’s unhealthy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
165
Q

2 ways in which Route 53 health checks can pass?

A
  • Only when the endpoint responds with the 2xx and 3xx status codes
  • Health Checks can be setup to pass / fail based on the text in the first 5,120 bytes of the response
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
166
Q

What are Route 53 calculated health checks?

A
  • Combine the results of multiple health checks (children) into a single Health Check (parent)
  • You can use OR, AND, or NOT
  • Can monitor up to 256 Child Health Checks
  • Specify how many of the child health checks needed to pass to make the parent pass
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
167
Q

True or False; Route 53 health checks can’t access private endpoints (private VPC or on-premises resources)?

A

True, Route 53 health checkers are outside the VPC.

You can create a CloudWatchMetric and associate a CloudWatch Alarm, then create a Health Check that checks the alarm itself

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

What is Route 53 Geolocation Routing Policy?

A
  • Routing based on user location
  • Specify location by continent, country or by US state
  • Should create a “Default” record in case of no match
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
169
Q

What is Route 53 Geolocation Routing Policy?

A
  • Route traffic to your resources based on the geographic location of users resources
  • You have the ability to shift more traffic to resource based on the defined bias
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
170
Q

What must be used with Route 53 Geoproximity routing policy?

A

Route 53 Traffic Flow

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

What is Route 53 Traffic Flow?

A
  • It simplifies the process of creating and maintaining records in large and complex configurations
  • Configurations can be saved as Traffic Flow Policy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
172
Q

True or False; Traffic Flow supports versioning?

A

True

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

What is Route 53 Multi-Value Routing Policy?

A
  • Use when routing traffic to multiple resources
  • Route 53 returns multiple values/resources
  • Can be associated with Health Checks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
174
Q

True or False; Route 53 Multi-Value Routing Policy can be used as a substitute for having an ELB?

A

False

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

How do you use a 3rd Party Domain Registrar with Route 53?

A

1, Create a Hosted Zone in Route 53
2, Update NS Records on 3rd party website to use Route 53 Name Servers

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

What is a VPC?

A

a private network to deploy your resources (regional resource)

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

What are subnets?

A

Allow you to partition your network inside your VPC (availability zone resource)

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

What is a public subnet?

A

a subnet that is accessible from the internet

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

What is a private subnet?

A

a subnet that is not accessible from the internet

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

How do you define access to the internet and between subnets?

A

Use route tables

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

What do NAT Gateways / NAT instances do?

A

Allow your instances in your Private Subnets to access the internet while remaining private

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

What are NACLs?

A
  • A firewall which controls traffic from and to subnets
  • Can have ALLOW and DENY rules
  • Are attached at subnet level
  • Rule only include IP addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
183
Q

What are Security Groups?

A
  • A firewall that controls traffic to and from an ENI / an EC2 Instance
  • Can have only ONLY rules
  • Rules include IP addresses and other security groups
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
184
Q

NACL are stateless or stateful?

A

Stateless

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

Security Groups are stateless or stateful

A

Stateful

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

For Security Groups, how are rules evaluated for allowing / denying traffic?

A

All rules are evaluated before deciding whether to allow traffic

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

For NACLs, how are rules evaluated for allowing / denying traffic?

A

Rules are processed in number order when deciding whether to allow traffic

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

What are VPC flow logs?

A
  • Capture information about IP traffic going into your interfaces (VPC Flow Logs, Subnet Flow Logs and ENI Flow Logs)
  • Helps to monitor & troubleshoot connectivity issues
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
189
Q

Where can VPC Flow Log data be stored?

A

S3 and CloudWatch Logs

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

What is VPC Peering?

A
  • Connects two VPCs, privately using AWS’ network
  • Makes them behave as if they were in the same network
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
191
Q

What rule if there regarding VPC Peering and CIDR?

A

Peered VPCs must not have overlapping CIDR (IP address range)

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

What are VPC Endpoints

A
  • VPC Endpoints allow you to connect to AWS Services using a private network instead of the public www network
  • This gives you enhanced security and lower latency to access AWS services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
193
Q

What AWS services can be used with VPC Endpoint Gateway?

A

S3 & DynamoDB

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

What AWS services can be used by VPC Endpoint Interface?

A

Others services (S3 and DynamoDB are used with VPC Endpoint Gateway)

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

What is Site-to-Site VPN?

A
  • Connect an on-premises VPN to AWS
  • Connection is automatically encrypted
  • Goes over the public internet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
196
Q

What is Direct Connect (DX)?

A
  • Establishes a physical connection between on-premises and AWS
  • The connection is private, secure and fast
  • Goes over a private network
  • Take at least a month to establish
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
197
Q

True or False; Site-to-Site VPN and Direct Connect can access VPC Endpoints?

A

False

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

At what level are S3 buckets defined?

A

Region level

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

7 S3 Bucket naming rules

A
  • Globally unique
  • No uppercase, no underscore
  • 3-63 characters long
  • not an IP
  • Must start with lowercase letter or number
  • Must NOT start with the prefix xn–
  • Must NOT end with the suffix -s3alias
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
200
Q

S3 max object size?

A

5TB

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

When to use S3 multi-part upload?

A

If uploading more than 5GB

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

In an S3 Bucket Policy, what are resources?

A

Buckets and objects

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

In an S3 Bucket Policy, what is Effect?

A

Allow / Deny

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

In an S3 Bucket Policy, what are Actions?

A

Set of API to Allow or Deny

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

In an S3 Bucket Policy, what are Principal?

A

The account or use to apply the policy to

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

At what level is S3 versioning enabled?

A

Bucket level

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

What are the requirements of using S3 Replication (CRR & SRR)?

A

Versioning must be enabled in source and destination buckets

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

Is S3 replication synchronous or asynchronous?

A

asynchronous

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

In S3, what can you use to replicate existing objects (not just new objects)?

A

S3 Batch Replication

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

Does S3 Replication replicate delete markers?

A

Yes (optional setting)

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

True or False; S3 deletions with a version ID are replicated?

A

False (to avoid malicious deletes)

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

True or False; in S3 there is no “chaining” of replication?

A

True

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

7 S3 Storage classes?

A
  • S3 Standard
  • S3 Standard Infrequent Access (IA)
  • S3 One zone Infrequent Access
  • S3 Glacier Instant Retrieval
  • S3 Glacier Flexible Retrieval
  • S3 Glacier Deep Archive
  • S3 Intelligent Tiering
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
214
Q

What is S3 Glacier Instant Retrieval?

A
  • Millisecond retrieval, great for data accessed once a quarter
  • Minimum storage duration of 90 days
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
215
Q

What is S3 Glacier Flexible Retrieval?

A
  • Has different retrieval options
  • Expedited (1 to 5 minutes)
  • Standard (3 - 5 hours)
  • Bulk (5 - 12 hours)
  • Minimum storage duration 90 days
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
216
Q

What is S3 Glacier Deep Archive?

A
  • For term storage
  • Standard retrieval (12 hours)
  • Bulk retrieval (48 hours)
  • Minimum storage duration of 180 days
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
217
Q

What is S3 Intelligent Tiering?

A
  • Move objects automatically between Access Tiers based on usage
  • Small monthly monitoring and auto-tiering fee
  • There are no retrieval charges
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
218
Q

How do you decode AWS CLI STS errors?

A

sts decode-authorization-message

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

What is the URL for EC2 instance metadata?

A

169.254.169.254/latest/meta-data

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

True or False; using EC2 instance metadata you can retrieve the IAM Role name and IAM Policy?

A

False;
- IAM Role name: YES
- IAM Policy: NO

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

How do you use MFA with the CLI?

A
  • You must create a temporary session by running the STS GetSessionToken API call:
    aws sts get-session-token –serial-number arn-of-the-mfa-device –token-code code-from-token –duration-seconds 3600
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
222
Q

What 8 programming languages are the official SDK in?

A
  • Java
    .NET
    Node.js
    PHP
  • Python
  • Go
  • Ruby
  • C++
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
223
Q

What is the API rate limit for DescribeInstances API for EC2?

A

100 calls per second

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

What is the API rate limit for GetObject API for S3?

A

5500 GET per second per prefix

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

How should you deal with intermittent API rate limit errors?

A

Implement Exponential Backoff

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

How should you deal with ConsistentAPI rate limit errors?

A

Request an API throttling limit increase

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

What is the service quota for running On-Demand Standard Instances?

A

1152 vCPU

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

What type of errors are 5xx errors?

A

Server errors

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

What type of errors are 4xx errors?

A

client errors

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

True or False; the exponential backoff retry mechanism is already included in the AWS SKD API calls?

A

True

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

For the AWS CLI Credentials Provider Chain, the CLI will look for credentials in what order?

A

1, Command Line options: –region, –output, and –profile
2, Environment Variables - AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN
3, CLI credentials file - aws configure
4, CLI configuration file - aws configure
5, Container credentials - for ECS tak
sks
6, Instance profile credentials - for EC2 Instance Profiles

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

For the AWS SDK Default Credentials Provider Chain, the Java SDK (example) will look for credential in what order?

A

1, Java system properties - aws.accessKeyId and aws.secretKey
2, Environment variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
3, The default credentials profile file - ex at: ~/.aws/credentials, shared by many SDKs
4, Amazon ECS container credentials - for ECS containers
5, Instance profile credentials - used on EC2 instances

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

What should you use to sign AWS HTTP requests?

A

Signature v4 (SigV4). If you use the SDK or CLI, the HTTP requests are signed for you

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

What are the 2 types of S3 Lifecycle rules?

A
  • Transition Actions (configure objects to transition to another storage class)
  • Expiration Actions (configure objects to expire (delete) after some time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
235
Q

True or False; S3 Lifecycle rules can be created for a certain prefix (eg: s3://mybucket/mp3/*)?

A

True

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

True or False; S3 Lifecycle rules can be created for certain object tags (eg, Department: Finance)?

A

True

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

True or False; with S3 Event Notifications, object name filtering is possible?

A

True (*.jpg)

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

How quick are S3 event notifications typically delivered?

A

Typically in seconds, but can sometimes take a minute or longer

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

4 S3 Event notification destinations?

A
  • SQS
  • SNS
  • Lambda
  • EventBridge
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
240
Q

Benefits of using EventBridge with S3 Event Notifications?

A
  • Advanced Filtering options with JSON rules (metadata, object size, name)
  • Multiple Destinations (Step Functions, Kinesis Streams / Firehose)
  • EventBridge Capabilities (Archive, Replay Events, Reliable delivery)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
241
Q

True or False; S3 automatically scales to high request rate, latency 100-200ms?

A

True

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

What API limits does S3 have?

A

Requests per second per prefix:
- 3,500 PUT/COPY/POST/DELETE
- 5,000 GET/HEAD

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

How to increase the S3 API limits?

A

Spread requests across multiple prefixes

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

What is S3 Transfer Accleration?

A

Increase object upload speed by transferring file to an AWS edge location which will forward the data to the S3 bucket in the target region

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

True or False; S3 Transfer Acceleration is compatible with multi-part upload?

A

True

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

What is S3 Byte-Range Fetches?

A

Parallelise GETs by requesting specific byte ranges

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

3 benefits of using S3 Byte-Range Fetches?

A
  • Better resilience in case of failures
  • Can be used to speed up downloads
  • Can be used to retrieve only partial data (eg, the head of a file)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
248
Q

What is S3 Select and Glacier Select?

A
  • Retrieve less data using SQL by performing server-side filtering
  • Can filter by row & columns (simple SQL statements)
  • Less network transfer, less CPU cost client side)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
249
Q

Four methods of encrypting objects in S3 buckets?

A
  • Server-Side encryption with Amazon S3-Managed Keys (SSE-S3)
  • Server-Side encryption with KMS Keys stored in AWS KMS (SSE-KMS)
  • Server-Side encryption with Customer-Provided Keys (SSE-C)
  • Client-Side Encryption
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
250
Q

For S3 encryption SSE-S3, what header must you set?

A

“x-amz-server-side-encryption”:”AES256”

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

2 benefits of using SSE-KMS for S3 encryption?

A
  • User control
  • Audit key usage using CloudTrail
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
252
Q

For S3 encryption SSE-KMS, what header must you set?

A

“x-amz-server-side-encryption”:”aws:kms”

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

True or False; you won’t be impacted by KMS limits when using SSE-KMS?

A

False; you might be

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

2 ways to “force encryption” in S3?

A
  • Use a bucket policy and refuse any API call to PUT an S3 object without encryption headers
  • Use the “default encryption” option in S3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
255
Q

What is CORS?

A
  • Cross-Origin Resource Sharing
  • Same origin: http://example.com/app1 & http://example.com/app2
  • Different origins: http://www.example.com & http://other.example.com
  • The request won’t be fulfilled unless the other origin allows for the requests, using CORS Headers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
256
Q

What must be enabled to use MFA Delete in S3?

A

Versioning must be enabled on the bucket

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

Who can enable/disable MFA delete?

A

Only the bucket owner (root account)

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

What are S3 access logs?

A
  • For audit purposes, you may want to log all access to S3 buckets
  • Any request made to S3, from any account, authorised or denied, will be logged into another S3 bucket
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
259
Q

True or False; for S3 Access Logs, the target logging bucket can be in another region?

A

False

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

3 ways you can generate S3 pre-signed URLs?

A
  • S3 console
  • AWS CLI
  • AWS SDK
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
261
Q

What permissions are users given with a pre-signed URL?

A

They inherit the permissions of the user that generated the URL

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

Pre-signed URL expiration for URL generated through the S3 console?

A

1 min - 12 hours

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

Pre-signed URL expiration for URL generated through the AWS CLI?

A
  • Max 168 hours
  • Default 1 hour
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
264
Q

What are S3 Access Points?

A
  • Access Points can used used access S3 buckets.
  • They can be granted read and / or write access to different buckets
  • Making it easier to manage than complex buckete policies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
265
Q

What is S3 Object Lambda?

A
  • Use AWS Lambda Functions to change the object before it is retrieved by the caller application
  • Only one S3 bucket is needed on top of which we create an S3 Access Point and S3 Object Lambda Access Points
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
266
Q

What CloudFront Origins can you have?

A

S3 Bucket

Custom Origin (HTTP):
- Application Load Balancer
- EC2 Instance
- S3 Website
- Any HTTP backend you want

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

What 3 things are CloudFront Caching cache based on?

A
  • Headers
  • Session Cookies
  • Query String Parameters
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
268
Q

How do you invalidate part of a CloudFront Cache?

A

By using the CreateInvalidation API

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

True or False; you can maximise CloudFront cache hits by separating static and dynamic content distributions?

A

True

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

How can you create Geo Restrictions in CloudFront?

A

By using an Allowlist or Blocklist

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

What can you use to distribute paid shared content to premium users over the world?

A

CloudFront Signed URL / Signed Cookies

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

True or False; the cost of data out is the same per edge location?

A

False; it varies per location

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

What are the 3 CloudFront price classes?

A

1, Price Class All: all regions - best performance
2, Price Class 200: most regions, but excludes the most expensive regions
3, Price Class 100: only the least expensive regions

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

What is CloudFront multiple origin?

A

Used to route to different kinds of origins based on the content type, using path patterns

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

What are CloudFront Origin Groups?

A
  • Has one primary and one secondary origin, if the primary origin fails, the second one is used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
276
Q

What is CloudFront Field LEvel Encryption?

A
  • Sensitive information is encrypted at the edge, close to the user
  • Protects user sensitive information through application stack
  • Adds an additional layer of security along with HTTPS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
277
Q

What are the basic steps of creating a docker container?

A
  • Create Dockerfile
  • Use Dockerfile to build Docker image
  • Use Docker image to run docker container
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
278
Q

True or False; on ECS with EC2 Launch Type; you must provision & maintain the infrastructure (the EC2 instances)?

A

True

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

On ECS, EC2 Launch Type, what must you run to register the ECS Cluster?

A

The ECS Agent

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

True or False; on ECS with Fargate Launch Type; you must provision & maintain the infrastructure (the EC2 instances)?

A

False, you just create task definitions

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

How does Fargate work?

A
  • It is serverless
  • You just create task definitions
  • AWS just runs ECS Tasks for you based on the CPU / RAM you need
  • To scale, just increase the number of tasks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
282
Q

What are ECS Task roles

A
  • Allows each task to have a specific role
  • Use different roles for the different ECS services you run
  • Task Role is defined in the task definition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
283
Q

Does ECS support load balancer integrations?

A

Yes, ALB and NLB

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

True or False; you can mount EFS file systems onto ECS tasks for both EC2 and Fargate launch types?

A

True

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

True or False; you can use S3 as a file system for ECS tasks for both EC2 and Fargate launch types?

A

False; S3 cannot be used as a file system

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

What is ECS Service Auto Scaling?

A

Automatically increase / decrease the desired number of ECS tasks

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

3 types are ECS Service Auto Scaling?

A
  • Target Tracking (scale based on target value for a specific CloudWatch metric)
  • Step Scaling (scale based on a specific CloudWatch Alarm
  • Scheduled Scaling (scale based on a specified date/time (predictable changes))
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
288
Q

What are EC2 Rolling Updates?

A

When updating from v1 to v2, we can control how many tasks can be started and stopped, and in which order

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

What are ECS Task Definitions?

A

Task definitions are metadata in JSON form to tell ECS how to run a Docker container

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

8 details contained with an ECS Task Definition?

A
  • Image Name
  • Port Binding for Container and Host
  • Memory and CPU required
  • Environmental variables
  • Networking information
  • IAM Role
  • Logging configuration (eg CloudWatch)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
291
Q

How many containers can you define in a task definition?

A

Up to 10

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

How does Load Balancing work with ECS - EC2 Launch Type?

A
  • We get a Dynamic Host Port Mapping if you define only the container port in the task definition
  • The ALB finds the right port on your EC2 instances
  • You must allow on the EC2 instance’s Security Group any port from the ALB’s Security Group
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
293
Q

How does Load Balancing work on Fargate?

A
  • Each task has a unique private IP
  • Only define the container port (host port is not applicable)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
294
Q

True or False; it is best practice for each ECS Task Definition to have it’s own IAM Role?

A

True

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

What are ECS Data Volumes?

A
  • Aloow you to share data between multiple containers in the same Task Definition
  • Works for both EC2 and Fargate Tasks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
296
Q

When ECS places task, what process does it use to select container instances?

A

1, Identify the instances that satisfy the CPU, memory, and port requirements in the task definition
2, Identify the instances that satisfy the task placement constraints
3, Identify the instances that satisfy the task placement strategies
4, Select the instances for task placement

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

3 ECS Task PLacement Strategies

A

1, Binpack:
- Place tasks based on the least available amount of CPU or memory
- this minimises the number of instances in use (cost saving)

2, Random:
- Place the task randomly

3, Spread:
- Place the task evenly based on the specified value

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

True or False; you can mix ECS Task Placement Strategies?

A

True

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

What are 2 ECS Task Placement Constraints?

A
  • distinctInstance (place each task on a different container instance)
  • memberOf (places task on instances that satisfy an expression, eg, type t2.*. Usese the Cluster Query Language)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
300
Q

What is ECR?

A
  • Elastic Container Registry
  • Store and mange Docker images on AWS
  • Private and public repository
  • Fully integrated with ECS, backed by S3
  • Access controlled through IAM
  • Supports image vulnerability scanning, versioning, image tags, image lifecycle, …
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
301
Q

What is Kubernetes?

A

Kubernetes is an open-source system for automatic deployment, scaling and management of containerised (usually Docker) application

Kubernetes is cloud-agnostic (can be used in any cloud)

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

What is EKS?

A
  • Elastic Kubernetes Service
  • It is a way to launch managed Kubernetes clusters on AWS
  • It’s an alternative to ECS, similar goal but different API
  • EKS supports EC2 if you want to deploy worker nodes or Fargate to deploy serverless containers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
303
Q

3 EKS Node Types

A

1, Managed Node Groups:
- Creates and manages Nodes (EC2 instances) for you
- Nodes are part of an ASG managed by EKS
- Supports On-Demand or Spot Instances

2, Self-Managed Nodes:
- Nodes created by you and registered to the EKS cluster and managed by an ASG
- You can use prebuilt AMI - Amazon EKS Optimised AMI
- Supports On-Demand or Spot Instances

3, AWS Fargate:
- No maintenance required; no nodes managed

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

What driver do EKS Data Volumes use?

A

a Container Storage Interface (CSI) compliant driver

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

What data volume can be used with EKS?

A
  • EBS
  • EFS (works with Fargate)
  • FSx for Lustre
  • FSx for NetApp ONTAP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
306
Q

What is Elastic Beanstalk?

A
  • A managed service for deploying an application on AWS
  • Automatically handles capacity provisioning, load balancing, scaling, application health monitoring, instance configuration…
  • Just the application code is the responsibility of the developer
  • We still have full control over the configuration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
307
Q

What are the Elastic Beanstalk components?

A
  • Application: collection of Elastic Beanstalk component (environments, versions, configurations, …)
  • Application Version: an iteration of your application code
  • Environment:
    – Collection of AWS resources running an pplication version (only one application version at a time)
    – Tiers: web server environment tier & worker environment tier
    – You can create multiple enviornments (dev, test, prod, …)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
308
Q

9 Elastic Beanstalk supported platforms?

A
  • Go
  • Java
  • .NET
  • Node.js
  • PHP
  • Python
  • Ruby
  • Packer Builder
  • Docker (single container | Multi-container | Preconfigured)

If not supported, you can write your custom platform (advanced)

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

6 Options for Elastic Beanstalk Deployment Updates

A
  • All at once (deploy all in one go)
  • Rolling
  • Rolling with additional batches
    -Immutable
  • Blue / Green
  • Traffic Splitting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
310
Q

What is Elastic Beanstalk Deployment - All at once?

A
  • Turn off old, turn on new
  • Fastest deployment
  • Application has downtime
  • Great for quick iteration in development environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
311
Q

What is Elastic Bean Stalk Deployment - Rolling

A
  • Turn off a few old, replace with new
  • Application is running below capacity
  • Can set the bucket size
  • Application is running both version of the app simultaneously
  • No additional cost
  • Long deployment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
312
Q

What is the Elastic Beanstalk deployment - Rolling with additional batches

A
  • Rolling, but new versions are added, before old are removed
  • Application is running at capacity
  • Can set the bucket size
  • Application is running both versions simultaneously
  • Small additional cost
  • Additional batch is removed at the end of the deployment
  • Longer deployment
  • Good for production environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
313
Q

What is Elastic Beanstalk Immutable Deployment?

A
  • New app versions are deployed to new instances in a temporary ASG
  • If ok, they are merged with the current (original) ASG
  • Then the original instances are terminated
  • Zero downtime
  • High cost, double capacity
  • Longest deployment
  • Quick rollback in case of failures (just terminate new ASG)
  • Great for production
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
314
Q

What is Elastic Beanstalk Blue / Green Deployment?

A
  • Not a ‘direct feature’ of Elastic Beanstalk
  • Create a new “stage” environment and deploy v2 there
  • Use Route 53 to setup weighted policies to redirect a little bit of traffic to the stage environment
  • The new environment can be validated independently and roll back if issues
  • Zero downtime and release facility
  • Use Beanstalk, “swap URLs” when done with the environment test
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
315
Q

True or False; Elastic Beanstalk has it’s own CLI?

A

True: EB CLI

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

What is the Elastic Beanstalk Deployment Process?

A
  • Describe dependencies (requirements.txt for python)
  • Package code
  • Console: upload zip file (create new app version), and the deploy
  • CLI: create new app version using CLI (uploads zip), and then deploy
  • Elastic Beanstalk will deploy the zip on each EC2 instance, resolve dependencies and start the application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
317
Q

What is the Elastic Beanstalk Lifecycle Policy?

A
  • Elastic Beanstalk can store at most 1,000 application versions
  • If you don’t remove old versions, you won’t be able to deploy any more
  • To phase out old application versions, use a lifecycle policy (based on time or space)
  • Versions that are currently used won’t be deleted
  • Option not to delete the source bundle in S3 to prevent data loss
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
318
Q

What are Elastic Beanstalk Extensions?

A
  • All the parameters set in the UI can be configured with code using files

Requirements:
- must be in the .ebextensions/ directory in the root of source code
- YAML / JSON format
- .config extensions (eg, logging.config)
- Able to modify some default settings using: option_settings
- Ability to add resources such as RDS, ElastiCache, DynamoDB, etc…

Resources managed by .ebextensions get deleted if the environment goes away

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

What service does Elastic Bean stalk use under the hood?

A

Elastic Beanstalk relies on CloudFromation

You can define CloudFormation resources in your .ebextensions to provision ElastiCache, an S3 Bcuket, anything you want!

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

True or False; it is possible to clone an Elastic Beanstalk environment?

A

True.

  • You can clone an environment with the exact same configuration
  • Useful for deploying a “test” version of your app
  • All resources and configuration are preserved
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
321
Q

True or False; after creating an Elastic Beanstalk environment, you can change the ELB type?

A

False; you have to migrate it

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

How do you migrate an Elastic Beanstalk app to have a different Elastic Load Balancer type?

A

1, Create a new environment with the same configuration except LB
2, deploy your application into the new environment
3, perform a CNAME swap or Route53 update

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

What is best practice for using RDS with Elastic Beanstalk?

A
  • RDS can be provisioned with Beanstalk, which is great for dev / test
  • This is not great for prod as the database lifecycle is tied to the Beanstalk environment lifecycle
  • The best for prod is to separately create an RDS database and provide our EB app with the connection string
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
324
Q

What do you provide to run your application in Elastic Beanstalk as a single Docker container?

A

Either provide:

  • Dockerfile: Beanstalk will build and run the Docker container
  • Dockerrun.aws.json(v1): describe where already built Docker image is (Image, Ports, Volumes, Logging etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
325
Q

True or FAlse; Beanstalk in Single Docker Container uses ECS?

A

False

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

What is Elastic Beanstalk Multi Docker Container?

A

Multi Docker container helps run multiple containers per EC2 instance in Elastic Beanstalk

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

What will Elastic Beanstalk Multi Docker Container create for you?

A
  • ECS cluster
  • EC2 instances, configured to use the ECS Cluster
  • Load Balancer (in high availability mode)
  • Task definitions and execution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
328
Q

What is required to create an Elastic Beanstalk Multi Docker container?

A
  • Requires a config Dockerrun.aws.json (v2) file at the root of source code
  • Dockerrun.aws.json is used to generate the ECS task definition
  • Your Docker images must be pre-built and stored in ECR for example
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
329
Q

How do you create your own Elastic Beanstalk Custom PLatform?

A
  • Define an AMI using Platform.yaml file
  • Build that platform using the Packer software (open source tool to create AMIs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
330
Q

In Elastic Beanstalk, what is the difference between Custom Image vs Custom Platform?

A
  • Custom Image is to tweak an existing Beanstalk Platform
  • Custom Platform is to create an entirely new Beanstalk Platform
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
331
Q

What is CodeCommit

A

Used for stoing our code

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

What is CodePipeline?

A

Used for automating our pipeline from code to Elastic Beanstalk

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

What CodeBuild?

A

Used for building and testing our code

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

What is CodeDeploy?

A

Used for deploying the code to EC2 instances (not Elastic Beanstalk)

335
Q

What is CodeStar?

A

Used to manage software development activities in one place

336
Q

What is CodeArtifact?

A

Used to store, publish, and share software packages

337
Q

What is CodeGuru?

A

Used to automate code reviews using Machine Learning

338
Q

What is Continuous Integration (CI)?

A
  • Devlopers push the code to a code repo often (Github, CodeCommit)
  • A testing / build server checks the code as soon as it’s pushed (CodeBuild, Jenkins CI)
  • The developer gets feedback about the tests and checks that have passed / failed
    _ Find bugs early, then fix bugs
  • Deliver faster as the code is tested
  • Deploy often
339
Q

What is Continuous Delivery (CD)?

A
  • Ensures that the software can be released reliably whenever needed
  • Ensure deployments happen often and are quick
  • Shift way from “one release every 3 months” to “5 releases a day”
  • that usually means automated deployment (eg, CodeDeploy, Jenkins CD)
340
Q

Features on CodeCommit?

A
  • Private git repositories
  • No size limit on repositories
  • Fully managed, highly available
  • Code only in AWS Cloud account => increased security and compliance
  • Security (encrypted, access control)
  • Integrated with Jenkins, AWS CodeBuild, and other CI tools
341
Q

What authorisation does CodeCommit use?

A

It uses IAM policies to manage users / roles permissions to repositories

342
Q

What is AWS CodePipeline?

A
  • Visual Workflow to orchestrate your CICD
  • Source - CodeCommit, ECR, S3, Bitbucket, Github
  • Build - CodeBuild, Jenkins
  • Test: CodeBuild, 3rd party tools
  • Deploy - CodeDeploy, Elastic Beanstalk, CloudFormation, ECS
  • Consists of stages
    – Each stage can have sequential actions and / or parallel actions, eg, build -> Test -> Deploy -> Load Testing -> …
    – Manual approval can be defined at any stage
343
Q

Where are CodePipeline artifacts stored?

A

In S3 buckets

344
Q

How do pass build instructions to CodeBuild?

A

Code file buildspec.yml or insert manually in Console

345
Q

Where can CodeBuild output logs be stored?

A

S3 or CloudWatchLogs

346
Q

How can you monitor CodeBuild build statistics?

A

CloudWatch metrics

347
Q

How can you detect failed builds and trigger notifications in CodeBuild?

A

Use CloudWatch Events

348
Q

What can you use to notify you if you need “threshold” for failures in CodeBuild?

A

CloudWatch Alarms

349
Q

9 supported environments for CodeBuild

A
  • Java
  • Ruby
  • Python
  • Go
  • Node.js
  • Android
  • .NET Core
  • PHP
  • Docker (extend any environment you like)
350
Q

When using CodeBuild, where must the buildspec.yml file be located?

A

At the root of your code

351
Q

True or False; you can run CodeBuild locally on your desktop?

A

True ( after installing Docker)

  • Useful for deep troubleshooting
  • Leverage the CodeBuild Agent
352
Q

By default, your CodeBuild containers are launched inside or outside your VPC?

A

OUtside - it cannot access resources in a VPC

353
Q

In CodeBuild can you specify a VPC configuration?

A

Yes, you can specify:
- VPC ID
- Subnet IDs
- Security Group IDs

Then your build can access resources in your VPC

354
Q

Which AWS service can be used to automatically deploy our application to many EC2 instances?

A

CodeDeploy

355
Q

How does CodeDeploy work?

A
  • Each EC2 Instance / on-premises server must be running the CodeDeploy agent
  • The agent is continuously polling AWS CodeDeploy for work to do
  • Application + appspec.yml is pulled from Github or S3
  • EC2 instance will run the deployment instructions in appspec.yml
  • CodeDeploy Agent will report of success/failure of the deployment
356
Q

In the CodeDeploy appsepc.yml, what are files?

A

How to source and copy from S3 / Github to filesystem
- source
- destination

357
Q

In the CodeDeploy appsepc.yml, what are hooks?

A

Hooks are a set of instructions to deploy the new version (hooks can have timeouts)

358
Q

In the CodeDeploy appsepc.yml, what is the hooks order?

A
  • ApplicationStop
  • DownloadBundle
  • BeforeInstall
  • Install
  • AfterInstall
  • ApplicationStart
  • ValidateService (important)
359
Q

4 CodeDeploy configurations:

A
  • One At A Time
  • Half At A Time
  • All At Once
  • Custom
360
Q

In CodeDeploy, what happens to failures?

A
  • EC2 Instances stay in “Failed” state
  • New deployments will first be deployed to failed instances
361
Q

In CodeDeploy, how to do rollbacks?

A

To rollback, redeploy old deployment or enable automated rollback for failures

362
Q

In CodeDeploy, how does a Blue/Green deployment work?

A
  • A new Auto-Scaling Group is created (settings are copied)
  • Choose how long to keep the old EC2 instances (old ASG)
  • Must be using an ELB
363
Q

In CodeDeploy, what happens for a rollback?

A

CodeDeploy redeploys the last known good revision as a new deployment (not a restored version)

364
Q

What is CodeStar?

A

-Quickly create “CICD-ready” projects for EC2, LAmbda, Elastic Beanstalk
-An integrated solution that groups: Github, CodeCommit, CodeBuild, CodeDeploy, CloudFormation, CodePipeline, CloudWatch…

365
Q

What is CodeArtifact?

A
  • Software packages depend on each other to be built (also called code dependencies), and new ones are created
  • Storing and retrieving these dependencies is called artifact management
  • CodeArtifact is a secure, scalable, and cost-effective artifact management for software development
366
Q

What is CodeGuru?

A

An ML-powered service for automated code reviews and application performance recommendations

367
Q

What two functionalities does CodeGuru provide:

A
  • CodeGuru reviewer: automated code reviews for static code analysis (development)
  • CodeGuru Profiler: visibility/recommendations about application performance during runtime (production)
368
Q

What programming languages does CodeGuru reviewer support?

A

What programming languages does CodeGuru reviewer support?
- Java
- Python

369
Q

What is CloudFromation?

A
  • CloudFormation is a declarative way of outlines your AWS Infrastructure, for any resources (most of them are supported)
  • Within a CloudFormation template you define what resources you want
  • Then CloudFormation creates those for you, in the right order, with the exact configuration that you specify
370
Q

Benefits of using CloudFormation?

A

Infrastructure as code:
- No resources are manually created, which is excellent for control
- The code can be version controlled
- Changes to the infrastructure are reviewed through code

Cost:
- Each resource with the stack is tagged with an identifier so you can easily see how much as stack costs you
- You can estimate the costs of your resources using CloudFormation template
-Savings strategy: In Dev, you could automate deletion of templates at 5PM and recreate at 8AM, safely

Productivity:
-Ability to destroy and re-create an infrastructure in the cloud on the fly
- Automated generation of Diagram for your templates
Declarative programming (no need to figure out ordering and orchestration)

Separation of concern: create many stacks for many apps, and many layers, eg:
- VPC stacks
- Network stacks
- App stacks

Don’ re-invent the wheel:
- Leverage existing templates on the web
- Leverage the documentation

371
Q

How odes CloudFormation work?

A
  • Templates have to be uploaded in S3 and then referenced in CloudFormation
  • To update a template, we can’t edit previous ones. We have to re-upload a new version of the template to AWS
  • Stacks are identified by a name
  • Deleting a stack deletes every single artifact that was created by CloudFormation
372
Q

How can you deploy CloudFormation templates?

A

Manually:
- Editing templates in the CloudFormation Designer
- Using the console to input parameters etc

Automated:
- Editing templates in a YAML file
- Using the AWS CLI to deploy the templates
- Recommended way when you fully want to automate your flow

373
Q

What are 6 CloudFormation Templates?

A

1, Resources: your AWS resources declared in the templated (MANDATORY)
2, Parameters: the dytnamic inputs for your template
3, Mappings: the static variables for your template
4, Outputs: References to what has been created
5, Conditionals: List of conditions to performa resource creation
6 Metadata

374
Q

What are CloudFormation resources?

A
  • Resources are the core of your CloudFormation Template (MANDATORY)
  • They represent the different AWS Components that will be created and configured
  • Resources are declared and can reference each other
  • AWS figures out create, updates and deletes of resource for us
375
Q

What is the form of CloudFormation resource type identifiers?

A

AWS::aws-product-name::data-type-name

376
Q

In CloudFormation templates, what are parameters?

A
  • Parameters are a way to provide inputs to your AWS CloudFormation template
  • They important if you want to reuse your templates across the company or some inputs can’t be determined ahead of time
377
Q

How to reference a parameter in a CloudFormation template?

A
  • Parameters can be used anywhere in a template
  • The shorthand for this in YAML is !Ref
  • The function can also reference other elements within the template
378
Q

What are Pseudo parameters in CloudFormation templates and give some examples?

A
  • AWS offers us pseudo parameters in any CloudFormation template
  • These can be used at any time and are enabled by default

Egs:
- AWS::AccountId
- AWS::NotificationARNs
- AWS::NoValue
- AWS::Region
- AWS::StackId
- AWS::StackName

379
Q

What are mappings in a CloudFormation template?

A
  • Mappings are fixed variables within your CloudFormation template
  • They’re handy to differentiate between different environments (dev vs prod), regions, AMI types etc
380
Q

What are mappings in a CloudFormation template?

A
  • Mappings are fixed variables within your CloudFormation template
  • They’re handy to differentiate between different environments (dev vs prod), regions, AMI types etc
  • All the values are hardcoded within the template
381
Q

When to use mappings vs paramets in a CloudFormation template?

A

Mappings are great when you know in advance all the values that can be taken and that they can be deducted from variables such as:
- Region
- Availability Zone
- AWS Account
- Environment
- Etc

382
Q

How do you access mapping values in a CloudFormation template?

A
  • We use Fn::FindInMap to return a named value from a specific key
  • !FindInMap [ MapName, TopLevelKey, SecondLevelKey ]
383
Q

What are outputs in CloudFormation templates?

A
  • The outputs sections declares optional output values that we can import into other stacks
  • You can also view the outputs in the AWS Console or using the AWS CLI
  • It’s the best way to perform some collaboration cross stack, as you let experts handle their own part of the stack
  • You can’t delete a CloudFormation Stack if its outputs are being referenced by another CloudFormation stack
384
Q

What are conditions in CloundFormation templates used for?

A
  • Conditions are used to control the creation of resources or outputs based on a condition
385
Q

What are 7 must know CloundFormation template intrinsic functions?

A
  • Ref
  • Fn::GetAtt
  • Fn::FindInMap
  • Fn::ImportValue
  • Fn::Join
  • Fn::Sub
  • Condition Functions (Fn::If, Fn::Not, Fn::Equals, etc)
386
Q

What happens on CloundFormation rollbacks?

A

Stack Creation Fails:
- Default: everything rolls back (gets deleted). We can look at the log
- Option to disable rollback and troubleshoot what happened

Stack update fails:
- The stack automatically rolls back to the previous known working state
- Ability to see in the log what happened and error messages

387
Q

In CloundFormation what are ChangeSets?

A
  • When you update a stack, you need to know what changes before it happens for greater confidence
  • ChangeSets won’t say if the update will be successful
388
Q

In CloudFormation what are Nested stacks?

A
  • Nested stacks are stacks as part of other stacks
  • They allow you to isolate repeated patterns / common components in separate stacks and call them from other stacks
  • Examples: load balancer configuration that is re-used or security group that is re-used
  • Nested stacks are considered best practice
  • To update a nested stack, always update the parent (root stack)
389
Q

CloundFormation, when to use Cross stacks vs Nested stacks?

A

Cross stacks:
- Helpful when stacks have different lifecycles
-Use Output Export and Fn::ImportValue
- When you need to pass export values to many stacks (VPC Id, etc…)

Nested Stacks:
- Helpful when components must be re-used
- Eg: how to properly configure an ALB
- The nested stack only is important to the higher level stack (it’s not shared)

390
Q

What are CloundFormation StackSets?

A
  • Create, update, or delete stacks across multiple accounts and regions with a single operation
  • Administrator account to create StackSets
  • Trusted accounts to create, update, delete stack instances from StackSets
  • When you update a stack seyt, all associated stack instances are updated throughout all accounts and regions
391
Q

What is CloundFormation drift?

A
  • Helps protect you against manual configuration changes
  • It allows you to see if your resources have changed since they where created
392
Q

3 ways of monitoring in AWS?

A

AWS CloudWatch:
- Metrics: Collect and track key metrics
- Logs: Collect, monitor , analyse and store log files
- Events: send notifications when certain events happen in yout AWS
- Alarms: React in real-time to metrics /events

AWS X-Ray:
- Troubleshoot application performance and errors
- Distributed tracing of microservices

AWS CloudTrail:
- Internal monitoring of API calls being made
- Audit changes to AWS REsources by your users

393
Q

What is CloudWatch Metrics:

A
  • CloudWatch provides metrics for every service in AWS
  • Metric is a variable t monitor
  • Metrics belong to namespaces
  • Dimension is an attribute of a metric
394
Q

What are CloudWatch custom metrics?

A
  • Possibility to define and send your own custom metrics to CloudWatch
395
Q

What API call do you use to create CloudWatch custom metrics?

A

PutMetricData

396
Q

5 AWS resources where CloudWatch Logs can send logs to?

A
  • S3
  • Kinesis Data Streams
  • Kinesis Data Firehose
  • AWS LAmbda
  • ElasticSearch
397
Q

What are CloudWatchLogs Metric Filter & Insights?

A
  • CloudWatch Logs can use filter expressions
  • They can be used to trigger CloudWatch alarms
  • CloudWatch Logs Insights can be used to query logs and add queries to CloudWatch DashBoards
398
Q

How long does Log data take to be available to export to S3?

A
  • Up to 12 hours
  • Not near real time or real- time … use Log Subscriptions instead
399
Q

How do CloudWatch Logs works for Ec2?

A
  • By default, no logs from your EC2 machine will go to CloudWatch
  • You need to run a CloudWatch agent on EC2 to push the log files you want
  • Make sure IAM permissions are correct
400
Q

What is the CloudWatch Logs Agent & Unified Agent?

A
  • For virtual servers (EC2, on-premises servers…)

CloudWatch Logs Agent:
- Old version of the agent
- Can only send to CloudWatch Logs

CloudWatch Unified Agent:
- Collect additional system-level metrics such as RAM, processes, etc
- Collect logs to send to CloudWatch Logs
- Centralised configuration using SSM Parameter Store

401
Q

What metrics are collected by the CloudWatch Unified Agent?

A
  • CPU (active, guest, idle, system, user, steal)
  • Disk metrics (free, used, total), Disk IO (writes, reads, byres, IOPS)
  • RAM (free, inactive, used, total, cached)
  • Netstat (number of TCP and UDP connections, net packets, bytes)
  • Processes (Total, dead, blocked, idle, running, sleep)
  • Swap Space (free, used, used %)
402
Q

Do CloudWatch Logs Metric Filter work on past data or new data?

A

CloudWatch Logs Metric Filter do not retroactively filter data, Filters only publish the metric data points for event that happen after the filter was created

403
Q

What are the 3 CloudWatch Alarms alarm states?

A
  • OK
  • INSUFFICIENT_DATA
  • ALARM
404
Q

What is the CloudWatch Alarm period?

A

The length of time in seconds to evaluate the metric

405
Q

What are 3 CloudWatch Alarm targets?

A
  • Stop, Terminate, Reboot or Recover an EC2 instance
  • Trigger Auto Scaling Action
  • Send notification to SNS (from which you can do pretty much anything)
406
Q

What are CloudWatch Alarms - Composite Alarms?

A
  • CloudWatch Alarms are on a single meteric
    Composite Alarms are monitoring the states of multiple other alarms
  • AND and OR conditions
  • Helpful to reduce “alarm noise” by creating complex composite alarms
407
Q

What are CloudWatch Alarms - Composite Alarms?

A
  • CloudWatch Alarms are on a single meteric
    Composite Alarms are monitoring the states of multiple other alarms
  • AND and OR conditions
  • Helpful to reduce “alarm noise” by creating complex composite alarms
408
Q

3 types of Event Buses for EventBridge?

A
  • Default Event Us: generated by AWS services (CloudWAtch EVents)
  • Partner Event Bus: received events from Saas service or applications
  • Custom Event Bus - for your own applications
409
Q

True or False; EventBridge gives you the ability to replay archived events?

A

True

410
Q

What is EventBridge schema registry?

A
  • EventBridge can analyse the events in your bus and infer the schema
  • The Schema Registry allows you to generate code for your application, that will know in advance how data is structured in the event bus
  • Schema can be versioned
411
Q

What is the difference between Amazon EventBridge and CloudWAtch Events?

A
  • Amazon EventBridge builds upon and extends CloudWAtch Events
  • It uses the same service API and endpoint, and the same underlying service infrastructure
  • EVentBridge allows extension to add event buseses for your custom applications and your third party SaaS apps
  • EventBridge has the Schema Registry capability
  • EventBridge has a different - Over time, the CloudWAtch Events name will be replaced with EventBridge
412
Q

Which AWS services is X-Ray compatible with (6)?

A
  • LAmbda
  • Elastic Beanstalk
  • ECS
  • ELB
  • API Gateway
  • EC2 instances or any application server (even on-premies)
413
Q

In AWS X-Ray, what is Tracing?

A
  • Tracing is an end to end way to follow a “request”
  • Each component dealing with the request adds its own “trace”
  • Tracing is made of segments (+ sub segments)
  • Annotations can be added to traces to provide extra-information
414
Q

How do you enable AWS X-RAy?

A

2 ways:

1, Your code must import the AWS X-Ray SDK:
- Very little code required

2, Install the X-Ray daemon or enable X-Ray AWS Integration

415
Q

What can you do to troubleshoot, if X-Ray is not working on EC2?

A
  • Ensure the EC2 IAM Role has the proper permissions
  • Ensure the EC2 instance is running the X-Ray Daemon
416
Q

How to enable X-Ray on AWS Lambda?

A
  • Ensure it has an IAM execution role with proper policy (AWSX-RayWriteOnlyAccess)
  • Ensure that X-Ray is imported in the code
417
Q

What is instrumentation?

A

Instrumentation means the measure of product’s performance, diagnose errors, and to write trace information

418
Q

In AWS X-Ray, what are segments and subsegments?

A
  • Segments: each application / service will send them
  • Subsegments: if need more details in your segments
419
Q

In AWS X-Ray, what is a trace?

A

A trace are segments collected together to form an end-to-end trace

420
Q

In AWS X-Ray, what are annotations?

A

Annotation are key value pairs used to index traces and use with filters

421
Q

Using the X-Ray SDK, what is recorded by default?

A

By default the X-Ray SDK records the first request each second, and five percent of any additional requests

422
Q

True or False; Elastic Beanstalk includes the X-Ray daemon?

A

True

423
Q

How can you run the X-Ray daemon with Elastic Beanstalk?

A

You can run the daemon by setting an option in the Elastic Beanstalk console or with a configuration file (in ebextensions/xray-daemon.config)

424
Q

What is CloudTrail?

A
  • Provides governance, compliance and audit for your AWS Account
  • Get a history of events / API calls made within your AWS Account by: Console / SDK / CLI / AWS Services
425
Q

True or False; CloudTrail is enabled by default?

A

True

426
Q

Where can you put CloudTrail logs?

A

CloudWatch Logs or S3

427
Q

CloudTrail trails can be applied to All Regions or a single Region?

A

Both; all regions is default

428
Q

If a resource is deleted in AWS, where is the first place to investigate?

A

CloudTrail

429
Q

What are the two types of CloudTrail events?

A
  • Management events
  • Data events
430
Q

What are CloudTrail Management events?

A
  • Operations that are performed on resources in your AWS account
  • By default trails are configured to log management events
  • Can separate Read events from write events
431
Q

What are CloudTrail Insights?

A

CloudTrail Insights analyses normal management events to create a baseline, and then continuously analyses write events to detect unusual patterns or activity in your account:
- inaccurate resource provisioning
- hitting service limits
- Bursts of AWS IAM actions
Gaps in periodic maintenance activity

432
Q

How long are events sytored for in CloudTrail?

A
  • EVents are stored for 90 days in CloudTrail
  • To keep events beyond this period, log them to S3 and use Athena
433
Q

What is the difference between CloudTrail vs CloudWatch vs X-Ray?

A

CloudTrail:
- Audit API calls made by users / services / AWS Console
- Useful to detect unauthorised calls or root causes of changes

CloudWatch:
- CloudWatch Metrics over time for monitoring
- CloudWatch Logs for storing application logs
- CloudWatch Alarms to send notifications in case of unexpected metrics

X-Ray:
- Automated Trace Analysis & Central Service Map Visualisation
- Latency, Errors and Fault analysis
- Request tracking across distributed systems

434
Q

What is the difference between synchronous and asynchronous communications?

A
  • Synchronous communication is direct: application to application
  • Asynchronous is not direct: app to queue to app
435
Q

How can you decouple your applications in AWS?

A
  • SQS: queue model
  • SNS: pub/sub model
  • Kinesis: real-time streaming model
436
Q

How do SQS queues work?

A

-Producers send messages to the SQWS queue
- Consumers poll for messages in the queue

437
Q

What attributes does SQS - Standard queue have?

A
  • Unlimited throughput, unlimited number of messages in queue
  • Default retention of messages: 4 days, maximum 14 days
  • Low latency (10 ms on publish and receive)
  • Limitation of 256KB per message sent
438
Q

Can you have duplicate messages in SQS Standard Queue?

A

Yes, you can have duplicate messages (at least once delivery, occasionally)

439
Q

In SQS standard queue, are messages in order?

A

Can have out of order messages (best effort ordering)

440
Q

How are SQS messages consumed?

A

Consumers:
- Poll SQS for messages (receive up to 10 messages at a time)
- Process the messages
- Delete the messages using the DeleteMessage API

441
Q

What is the CloudWAtch Metric to get an SQS Queue length?

A

ApproximateNumberOfMessages

442
Q

How is security managed for SQS?

A

Encryption:
- Insliflight encryption using HTTPS API
- At-rest encryption using KMS keys
- Client-side encryption if the client wants to perfrom encryption/decryption themselves

Access Controls:
- IAM policies to regulate access to the SQS API

SQS Access Policies (similiar to S3 bucket policies):
- Useful for cross-account access to SQS queues
- Useful for allowing other services to write to an SQS queue

443
Q

What is the default message visibility timeout for an SQS queue?

A

30 seconds

444
Q

How can a consumer get more time to process a message in SQS?

A

Call the ChangeMessageVisibility API to get more time (increase Visibility timeout)

445
Q

What are Dead Letter Queues for SQS?

A
  • If a consumer fails to process a message within the Visibility Timeout - the message goes back to the queue
  • We can set a threshold of how many times a message can go back to the queue
  • After the MaximumReceives threshold is exceeded, the message goes into a dead letter queue
  • Dead Letter Queues are a type of SQS queue
  • A deadletter Queue of a FIFO queue must also be a FIFO queue
  • A Dead Letter Queue of a standard queue must also be a Standard Queue
446
Q

How do you send messages from the Dead Letter Queue back to the source queue (or any other queue)?

A

Redrive to source

447
Q

What is SQS Delay Queue?

A
  • Delay a message (consumers don’t see it immediately) up to 15 minutes
  • Default is 0 seconds
448
Q

Is it possible to override the default SQS Delay Queue?

A

Yes, using the DelaySeconds parameter

449
Q

What is the message size limit in SQS?

A

256KB

450
Q

How do you send messages larger than 256KB in SQS?

A

By using the SQS Extended Client (Java Library)

451
Q

What is the maximum throughput when using SQS FIFO queues?

A

300 msg/s with batching, 3000 msg/s with batching

452
Q

How many times are SQS FIFO queue messages sent?

A

Exactly-once (no duplicates)

453
Q

What is the SQS FIFO Deduplication interval

A

5 minutes

454
Q

What are two SQS FIFO Deduplication methods?

A
  • Content-based deduplication: will do a SHA-256 hash of the message body
  • Explicitly providing a Message Duplication ID
455
Q

How does SQS FIFO Message Grouping work?

A
  • If you specify the same value of MessageGroupID in an SQS FIFO queue, you can only have one consumer, all the messages are in order
  • To get ordering at the level of a subset of messages, specify different values of MessageGroupID
  • Messages that share a common Message Group ID will be in order within a group
  • Each Group ID can have a different consumer (parallel processing)
  • Ordering across groups is not guaranteed
456
Q

What is SNS?

A
  • The “event producer” only sends message to one SNS topic
  • As many “event receivers” (subscriptions) as we want to listen to the SNS topic notifications
  • Each subscriber to the topic will get all the messages
457
Q

How to do publish in SNS?

A

Topic Publish:
- Create a topic
- Create a subscription (or many)
- Publish to the topic

Direct Publish (for mobile app SDK):
- Create a platform application
- Create a platform endpoint
- Publish to the platform endpoint
- Work with Google GCM, Apple APNS, Amaazon ADM…

458
Q

What is SNS + SQS fan out?

A
  • Push once in SNS, receive in all SQS queues that are subscribers
  • Fully decoupled, no data loss
  • Cross-REgion Delivery, works with SQS queues in other regions
459
Q

What is SNS FIFO Topic?

A
  • First-in-First-out (ordering of messages in the topic)
  • Similar features as SQS FIFI (ordering by MEssage Group ID and Deduplication)
  • CAn only have SQS FIFO queues as subscribers
  • Limited throughput (same throughput as SQS FIFO)
460
Q

True or False; you can filter messages sent to SNS topic’s subscriptions?

A

True

461
Q

What is Kinesis?

A
  • Makes it easy to collect, process and analyse streaming data in real-time
  • Ingest real-time data such as: Application logs, metrics, Website clickstreams, IoT telemtry data
462
Q

What is Kinesis Data Streams?

A

capture, process and store data streams

  • ability to reprocess (replay) data
  • Once data is inserted in Kinesis, it can’t be deleted (immutability)
  • Data that shares the same partition goes to the same shard (ordering)
463
Q

What is Kinesis Data Firehose?

A

load data streams into AWS data stores

464
Q

What is Kinesis Data Analytics?

A

analyse data streams with SQL or Apache Flink

465
Q

What is Kinesis Video Streams?

A

capture, process and store video streams

466
Q

What are the two Kinesis Data Streams capacity modes?

A
  • Provisioned mode
  • On-demand mode
467
Q

What is the Kinesis Data Streams provisioned capacity mode?

A
  • You choose the number of shared provisioned, scale manually or using API
  • Each shard get 1MB/s in (or 1000 records per second)
  • Each shared get 2MB/s out (classic or enhanced fan-out consumer)
  • You pay per shard provisioned per hour
468
Q

What is the Kinesis Data Streams On-demand mode?

A
  • No need to provision or manage the capacity
  • Default capacity provisioned (4 MB/s in or 4000 records)
  • Scales automatically based on observed throughput peak during the last 30 days
  • Pay per stream per hour & data in/out per GB
469
Q

What do Kinesis Data Streams data record consist of (3)?

A
  • Sequence number (unique per partition-key within shard)
  • Partition key (must specify while put records into stream
  • Data blob (up to 1mb)
470
Q

What is the write throughput for Kinesis Data Streams?

A

1 MB/sec or 10,000 records/sec per shard

471
Q

How do you reduce costs & increase throughput in Kinesis Data Streams?

A

Use batching with PutRecords API

472
Q

In Kinesis Data Streams how do you avoid a “hot partition”?

A

Use highly distributed partition key

473
Q

3 solutions to ProvisionedThroughputExceeded errors in Kinesis Data Streams?

A
  • Use highly distributed partition key
  • Retries with exponential backoff
  • Increase shards (scaling)
474
Q

2 types of Kinesis Data Streams consumer types?

A
  • Shared (Classic) Fan-out Consumer - pull
  • Enhanced Fan-out consumer - push
475
Q

For the Kinesis Shared (Classic) Fan-out Consumer, how many consuming applications can you have?

A

Low number

476
Q

For the Kinesis Shared (Classic) Fan-out Consumer what is the read throughput?

A

2 MB/sec per shared across all consumer

477
Q

For the Kinesis Shared (Classic) Fan-out Consumer what is the max. GetRecords API calls/sec?

A

5

478
Q

For the Kinesis Shared (Classic) Fan-out Consumer what is the latency?

A

~200ms

479
Q

For the Kinesis Shared (Classic) Fan-out Consumer how do consumers poll data?

A

Using the GetRecords API call

480
Q

For the Kinesis Shared (Classic) Fan-out Consumer how much data is returned?

A

Returns up to 10 MB (then throttle for 5 seconds) or up to 10,000 records

481
Q

For the Kinesis Enhanced Fan-out Consumer how many application can connect?

A

Multiple applications for the same stream

482
Q

For the Kinesis Enhanced Fan-out Consumer what is the read throughput?

A

2 MB/sec per consumer per shard

483
Q

For the Kinesis Enhanced Fan-out Consumer what is the latency?

A

~70ms

484
Q

For the Kinesis Enhanced Fan-out Consumer how is data pushed to consumers?

A

over HTTP/2 (SubscribeToShard API)

485
Q

For the Kinesis Enhanced Fan-out Consumer what is the limit of consumer applications (KCL) per data stream (default)

A

soft limit of 5

486
Q

When lambda is a consumer on Kinesis Data Streams, how many batches can be processed?

A

Can process up to 10 batches per shard simultaneously

487
Q

What is the Kinesis Client Library(KCL)?

A
  • A Java library that helps read record from a Kinesis Data Stream with distributed aplications sharing the read workload
  • Each is to be read by only one KCL instance
  • Progress is checkpointed into DynamoDB
  • Track other workers and share the work amongst shards using DynamoDB
  • KCL can run on EC2, Elastic Beanstalk and on-premises
  • Records are read in order at the shard level
488
Q

In Kinesis Data Streams, what is Shared Splitting?

A
  • Used to increase the Stream capacity
  • Use to divide a “hot shard”
  • The old shard is closed and will be deleted once the data is expired
  • Can’t split into more than two shards in a single operation
489
Q

In Kinesis Data Streams what is Merging Shards?

A
  • Cecrease the Steam capacity asnd save costs
  • Can be used to group two shards with low traffic (cold shards)
  • Old shards are closed and will be deleted once the data is expired
  • Can’t merge more than two shards in a single operation
490
Q

What is Kinesis Fire Hose?

A
  • loads data streams into AWS data stores
  • Fully managed service
  • Pay for data going through Firehose
  • Near Real Time
  • Supports many data formats, conversions, transformations, compression
  • Supports custom data transformations using AWS Lambda
491
Q

Kinesis Fire Hose is real-time?

A

No, it is NEAR real-time

492
Q

Where can Kinesis Firehose send data to?

A

AWS:
- Redshift
- S3
- ElasticSearch

3rd PArty partner:
- Splunk
- MongoDB
- DataDog

Cusom:
- To any HTTP endpoint

493
Q

What is Kinesis Data Analytics?

A
  • Real-time analytics on Kinesis Data Streams & Firehose using SQL
  • Add reference data from S3 to enrich streaming data
  • Fully managed
  • Automatic scaling
  • Pay for actual consumption rate
494
Q

What sources and destinations are available for Kinesis Data Analytics?

A

Kinesis Data Streams and Kinesis Fire Hose for both Sources and Destinations

495
Q

How are you charged for using AWS Lambda?

A
  • Pay per request and compute time
  • Free tier of 1,000,000 Lambda requests and 400,000 GBs of computer time
496
Q

How do you expose a Lambda function as a HTTP(S) endpoint?

A
  • You can use the Application Load Balancer or an API Gateway
  • The Lambda function must be registered in a target group
497
Q

How are ALB Multi-Header Values shown within the AWS Lambda event and response objects?

A

HTTP headers and query string parameters that are sent with multiple values are shown as arrays

498
Q

True or False; you can use Lambda@edge to change CloudFront requests and responses?

A

True

499
Q

What are Lambda asynchronous invocations?

A
  • Lambda reads events from an Event queue
  • Lambda attempts to retry on errors, using exponential backoff
500
Q

3 examples of Lambda asynchronous invocations using AWS services?

A
  • S3
  • SNS
  • CloudWatch Events / EventBridge
501
Q

What is Lambda Event Source Mapping?

A
  • Kinesis Data Streams, SQS queues and DynamoDB Streams need to be polled
  • The results of the polling go into the event source mapping, which is a queue
  • When there are items in the event source mapping queue, your lambda function is invoked synchronously with the event batch
502
Q

With Streams and Lambda, how are errors handled?

A
  • By default, if your function returns an error, the entire batch is reprocessed until the function succeeds, or the items in the batch expire
  • To ensure in-order processing, processing for the affected shard is paused until the error is resolved
  • You can configure the event source mapping to discard old events, restrict the number of retries and split the batch on error
503
Q

For Lambda event source mapping with SQS queues, what the the recommended length of the queue visibility timeout?

A

6x the timeout of your lambda function

504
Q

How doe scaling work with Lambda Event Mapper foreach different input service?

A

Kinesis Data Streams & DynamoDB Streams:
- One lambda inovation per stream shard
- If you use parallelization, to to 10 batches processed per shard simultaneously

SQS Standard:
- Lambda adds 60 more instances per minute to scale up
- Up to 1000 batches of messages processed simultaneously

SQS FIFO:
- Messages with the same GroupID will be processed in order
- The Lambda function scales to the number of active message groups

505
Q

What is the Lambda Execution Role?

A

An IAM Role that grants the lambda function permissions to AWS services / resources

When you use an event source mapping to invoke your function, Lambda uses the execution role to read event data

Best practice is to create one Lambda Execution Role per function

506
Q

What are Lambda resource based policies?

A
  • Use resource-based policies to give other accounts and AWS services permissions to use your Lambda resources
  • Similar to S3 bucket policies for S3 buckets
507
Q

What are Lambda environment variables?

A
  • Environment variables are key / value pairs in “String” form
  • Environment variables are available to your code
    -Helpful to store secrets (encrypted by KMS)
  • Secrets can be encrypted by trhe Lambda service key, or your own CMK
508
Q

Where are Lambda execution logs stored?

A

CloudWatch logs.

Make sure your AWS Lambda function has an execution role with an IAM policy that authorises writes to CloudWatch Logs

509
Q

How to enable Lambda tracing with X-Ray?

A
  • Enable in Lambda configuration (Active Tracing)
  • Runs the X-Ray daemon for you
  • use AWS X-Ray SDK in code
  • Ensure Lambda function has a correct IAM execution role - the managed policy is called AWSXRayDaemonWriteAccess
510
Q

By default, is your Lambda function is launched inside or outside of your own VPC?

A
  • Outside
  • Therefore it cannot access resources in your VPC
511
Q

How do you allow a Lambda function to access your VPC?

A
  • You must define the VPC ID, the Subnets and the Security Groups
  • Lambda will create an ENI (Elastic Network Interface) in your subnets
  • AWSLambdaVPCAccessExecutionRole
512
Q

How can you give a Lambda function in a VPC internet access?

A
  • A LAmbda function in your VPC does not have internet access
  • Deploying a Lambda function in a public subnet does not give it internet access or a public IP
  • Deploying a Lambda function in a private subnet gives it internet access if you have a NAT Gateway / Instance
  • You can use VPC endpoints to privately access AWS services without a NAT
513
Q

What should you do if your lambda is CPU-bound (computation heavy)?

A

Increase RAM

514
Q

Can you increase RAM in Lambda?

A

Yes

  • From 128MB to 10GB in 1MB increments
  • The more RAM you add, the more vCPU credits you get
  • At 1,792 MB, a function has the equivalent of one full vCPU
  • After 1,792 MB, you get more than one CPU, and need to use multi-threading in your code to benefit from it
515
Q

What is the default and max. timeout for Lambda executions?

A
  • Default = 3 seconds
  • Max. is 900 seconds (15 mins)
516
Q

What is the Lambda Execution Context?

A
  • Basically it is the code outside the handler
  • It is a temporary runtime environment that initialses asny exteneral dependencies of your lambda code
  • Great for database connections, HTTP clients, SDK clients…
  • The execution context is maintained for some time in anticipation of another LAmbda function invocation
  • The next functioninvocation can “re-use” the context to execution time and save time in initialising connection objects
  • The execution context includes the /tmp directory
517
Q

What is the Lambda Execution Context?

A
  • Basically it is the code outside the handler
  • It is a temporary runtime environment that initialses asny exteneral dependencies of your lambda code
  • Great for database connections, HTTP clients, SDK clients…
  • The execution context is maintained for some time in anticipation of another LAmbda function invocation
  • The next functioninvocation can “re-use” the context to execution time and save time in initialising connection objects
  • The execution context includes the /tmp directory
518
Q

What can you use if your lambda function needs to download a big file or needs disk space to p[erform operations?

A

-You can use the /tmp directory
- MAx size is 10GB
- The directory content remains when the execution context is frozen, providing transient cache that can be used for multiple invocations
- For permanent persistence of object , use S3

519
Q

How many concurrent lambda invocations can you have?

A

-Up to 1000
- You can set a “reserved concurrency” limit for each lambda function
- Each invocation over the concurrency limit will trigger a “throttle”

520
Q

What happens with lambda concurrency and asynchronous invocations?

A
  • If the function doesn’t have enough concurrency available to process all event, additional requests are throttled
  • For throttling errors (429) and system errors (5xx), Lambda returns the event to the queue and attempts to run the function again for up to 6 hours
  • The retry interval increases exponentially from 1 second up to a max. of 5 mins
521
Q

How do you manage your lambda function if it has dependencies?

A
  • You need to install the packages alongside your code and zip it together
  • Upload the zip straight to lambda if less than 50MB, else to S3
  • AWS SDK comes by default with every lambda function
522
Q

2 ways in which we can use CloudFormation to upload a Lambda function?

A

Inline:
- inline functions ar every simple
- Use the Code.ZipFile property
- You cannot include function dependencies withi inline functions

Through S3:
- You must store the Lambda zip in S3
- You must refer the S3 zip location in the CloudFormation template

523
Q

What are 2 use-cases for Lambda layers?

A
  • Creating custom runtimes, eg, c++ or Rust
  • Externalizing dependencies to re-use them
524
Q

What are Lambda container images?

A
  • Deploy Lambda functions as container images of up to 10GB from ECR
  • Pack complex dependencies, large dependencies in a container
  • Can create your own image as long as it implement the Lambda Runtime API
525
Q

How do Lambda versions work?

A
  • When you work on a Lambda function, we work on $LATEST
  • When we’re ready to publish a Lambda function, we create a version
  • Versions are immutable
  • Versions have increasing version numbers
  • Versions get their own ARN
  • Version = code + configuration
  • Each version of the lambda function can be accessed
526
Q

How do Lambda aliases work?

A
  • Aliases are “pointers” to Lambda function versions
  • We can define a “dev”, “test”, “prod” aliases and have them point at different lambda versions
  • Aliases are mutable
  • Aliases enable blue / green deployments
  • Aliases have their own ARNs
  • Aliases cannot reference aliases
527
Q

How can you automate traffic shift for Lambda aliasses?

A
  • Use CodeDeploy
  • Feature is integrated within the SAM framework
  • Can create Pre & Post Traffic hooks to check the health of the Lambda function
528
Q

What are the Lambda limits (per region) for: memory allocation?

A

128 - 10GB (1MB increments)

529
Q

What are the Lambda limits (per region) for: max. execution time?

A

900 seconds (15 mins)

530
Q

What are the Lambda limits (per region) for: environment variable size?

A

4KB

531
Q

What are the Lambda limits (per region) for: Disk capacity in the “function container” (in/tmp)?

A

512MB to 10GB

532
Q

What are the Lambda limits (per region) for: concurrency executions?

A

1000 (can be increased)

533
Q

What are the Lambda limits (per region) for: KAmbda function deployment size (compressed zip)?

A

50MB

534
Q

What are the Lambda limits (per region) for: size of uncompressed deployment (code + dependencies)?

A

250MB

535
Q

How do NoSQL databases scale?

A

horizontally

536
Q

How big can DynamoDB scale to?

A
  • Millions of requests per second
  • Trillions of rows
  • 100s of TB of storage
537
Q

Two types of table class for DynamoDB?

A
  • Standard
  • Infrequent Access (IA)
538
Q

Do DynamoDB tables have primary key?

A

Yes, must be decided at creation time

539
Q

Max. item size in DynamoDB?

A

400KB

540
Q

What data types are supported in DynamoDB?

A
  • Scalar tpyes: string, number, binary, boolean, null
  • Document types: list, map
  • Set types: string set, number set, binary set
541
Q

What options do you have for primary keys in DynamoDB?

A

Option 1: Partition Key (HASH):
- Partition key must be unique for each item
- Partition key must be “diverse” so that the data is distributed
- Eg, “User_ID” for a users table

Option 2: Partition Key + Sort Key (HASH + RANGE):
- The combination must be unique for each item
- Data is grouped by partition key
- Eg: users-games table, “User_ID” for PArtition Key and “Game_ID” for sort key

542
Q

What are the two Read/Write capacity modes?

A
  • Provisioned Mode (Default)
  • On-demand mode

You can switch between different modes once every 24 hours

543
Q

What is the DynamoDB provisioned mode?

A
  • You specify the number of reads/write per second
  • You need to plan capacity beforehand
  • Pay for provisioned read & write capacity units
  • Option to setup auto-scaling of throughput to meet demand
  • throughput can be exceeded temporarily using “Burst capcity”
  • If burst capcity has been consumed, you’ll get a “ProvisionedThroughputExceededException”
  • Then its advised to do an exponential backoff
544
Q

What is the DynamoDB On-Demand mode?

A
  • Read/writes automatically scale up/down with your workloads
  • No capacity planning needed
  • Pay for what you use, more expensive
545
Q

How do dynamoDB Write Capacity Units (WCU) work?

A
  • 1 WCU represents 1 write per second for an item up to 1KB in size
  • If the items are larger than 1KB, more WCUs are consumed
546
Q

For DynamoDB, how many WCUs do we need in this example:

We write 10 items per second, with item size 2KB

A

10 x (2KB / 1KB) = 20WCUs

547
Q

For DynamoDb, how many WCUs do we need in this example:

we write 6 items per second, with item size 4.5KB

A

6 x (5kb / 1KB) = 30 WCUs

548
Q

For DynamoDb, how many WCUs do we need in this example:

we write 120 items per minute, with item size 2KB

A

(120 / 60) * (2KB / 1KB) = 4 WCUs

549
Q

In DynamoDB, what are eventually consistent reads and strongly consistent reads?

A

Eventually Consistent Reads (default):
- If we read just after a write, it’s possible we’ll get some stale data because of replication

Strongly Consistent Read:
- If we read just after a write, we will get the correct data
- Set “ConsistentRead” parameter to True, in API calls (GetITem, BatchGetITem, Query, Scan)
- Consumes twice the RCU

550
Q

In DynamoDB, how do Read Capacity Units (RCU) work?

A
  • One RCU represents one Strongly Consistent Read per second, or two Eventually Consistent Reads per second, for an item up to 4KB in size
  • If the items are larger than 4KB, more RCU is are consumed
551
Q

For DynamoDB, how many RCUs do we need in this example:

10 Strongly Consistent reads per second, with item size 4KB

A

10 x (4KB / $KB) = 10 RCUs

552
Q

For DynamoDB, how many RCUs do we need in this example:

16 Eventually Consistent reads per second, with item size 12KB

A

(16 / 2) x (12KB / 4KB) = 24 RUCs

553
Q

For DynamoDB, how many RCUs do we need in this example:

10 Strongly Consistent reads per second, with item size 6KB

A

10 x (8KB / 4 KB) = 20 RCUs - we must round up from 6KB to 8KB)

554
Q

What are the reasons and solutions to trottling in DynamoDB?

A

If we exceed provisioned RCUs or WCUs, we get “ProvisionedThroughputExceededException”

Reasons:
- Hot keys: one partition key is being read too many times (eg popular item)
- Hot partitions
- Very large item,: remember RCU and WCU depends on the size of items

Solutions:
- Exponential back-off
- Distributed partition keys as much as possible
- If RCU issue, we can use DynamoDB Accelerator (DAX)

555
Q

What DynamoDB API calls can be used to write data?

A

PutITem
- Create a new item or fully replaces an old item (same primary key)
- Consumes WCUs

UpdateItem
- Edits an existing item’s attributes or adds a new item if it doesn’t exist
- CAn be used to implement Atomic Counters- a numberic attribute that’s unconditionally incremented

ConditionalWrites:
- Accept a write/update/delete only if conditions are met, otherwise returns an error
- Helps with concurrent access to items

556
Q

What DynamoDB API calls can be used to read data?

A

GetITem:
- Read based on Primary Key
- Eventually Consistent Read ((default)
- ProjectionExpression can be specified to retrieve only certain attributes

557
Q

How do you query data in DynamoDB?

A

Query reyruns items based on:

KeyConditionExpression:
- Partition key value (must be - operator) - required
- Sort key value (=,<,<=<>,>=,Between,Begins with) - optional

FilterExpression:
- Additional filtering after the query operation (before data is returned to you)
- Use only with non-key attributes (does not allow HASH or RANGE attributes)

Return the number of items specified in Limit, or up to 1MB of data

Can query table, a Local Secondary Index, or a Global Secondary Index

558
Q

How does Reading Data (Scan) for DynamoDB work?

A
  • Scan the entire table and then filter out data (inefficient)
  • Returns up to 1MB of data - use pagination to keep on reading
  • Consumes a lot of RCU
  • Limit impact using Limit or reduce the size of the result and pause
  • For faster performance, use Parallel Scan
559
Q

What DynamoDB API calls can be used to delete data?

A

DeleteItem:
- Delete an individual item
- Ability to perform a conditional delete

DeleteTable:
- Delete a whole table and its items
- Much quicker deletion than calling DeleteItem on all items

560
Q

What are batch operations in DynamoDB?

A
  • Allows you to save in latency by reducing the number of API calls
    -Operations are done in parallel for better efficiency
  • Part of a batch can fail; in which case we need to try again for the failed items
561
Q

What are the two DynamoDB batch operation API calls?

A

BatchWriteItem:
- Up to 25 PutItem and/or DeleteITem in one call
- Up to 16MB of data written, up to 400KB of data per item
- CAn’t update items (use UpdateITem)

BatchGetItem:
- Return items from one or more tables
- Up to 100 items, up to 16MB of data
- Items are retrieved in parallel to minimise latency

562
Q

In DynamoDB, what is a Local Secondary Index (LSI)?

A
  • Alternative Sort Key for your table (same partition key as that of the base table)
  • The Sort key consists of one scalar attribute (string, number, or binary)
  • Up to 5 local Secondary Indexes per table
  • Must be defined at table creation time
  • Attribute Projections - can contain some or all the attributes of the base table (KEYS_ONLY, INCLUDE, ALL)
563
Q

In DynamoDB, what is a Global Secondary Index (GSI)?

A
  • Alternative Primary Key from the base table
  • Speed up queries on non-key attributes
  • The index key consists of scalar attributes (string, number or binary)
  • Attribute projections - some or all the attributes of the base table (KEYS_ONLY, INCLUDE, ALL)
  • Must provision RCUs and WCUs for the index
  • Can be added/modified after table creation
564
Q

In DynamoDB, how does throttling work with Global Secondary Indexes and Local Secondary Indexes?

A

Global Secondary Index:
- If the writes are throttled on the GSI, then the main table will be throttled
- Even if the WCU on the main tables are fine
- Choose your GSI partition key carefully
- Assign your WCU capacity carefully!

Local Secondary Index:
- Uses the WCUs anr eRCUs of the main table
- No special throttling considerations

565
Q

What is DynamoDB - PartiQL?

A
  • Use a SQL-like syntax to manipulate DynamoDB tables
  • Support some (but not all) statements (INSERT, UPDATE, SELECT, DELETE)
  • SUpports Batch operations
566
Q

In DynamoDB, what is Optimiistic Locking?

A
  • DynamoDB has a feature called “Conditional Writes”
  • Astrategy to ensure an item hasn’t changed before you update/delete it
  • Each item has an attribute that acts as a version nuimmber
567
Q

What is DynamoDB Accelerator (DAX)?

A
  • Fully-managed, highly available, seamless in-memory cache for DynamoDB
  • Microseconds latency for cached reads and queries
  • Doesn’t require application logic modification (compatible with existing DynamoDB APIs)
  • Solves the “Hot Key” problem (too many reads)
  • 5 minutes TTL for cache (default)
  • Up to 10 nodes in the cluster
  • Multi-AZ (3 nodes minimum recommended for production)
  • Secure (Encryption at rest with KMS, VPC, IAM, CloudTrail, …)
568
Q

What are DynamoDB streams?

A
  • Ordered stream of item-level modifications (create/update/delete) in a table
  • Stream records can be (sent to Kinesis Data Streams | Read by Lambda | Read by Kinesis Client Library applications)
  • Data retention for up to 24 hours
569
Q

In DynamoDB streams, what information can be written to the stream?

A
  • KEYS_ONLY: only the key attributes of the modified item
  • NEW_IMAGE: the entire item, as it appears after it was modified
  • OLD_IMAGE: the entire item, as it appears before it was modified
  • NEW_AND_OLD_IMAGES: both the new and the old images of the item
570
Q

What are DynamoDB streams made of?

A

Shards, just like Kinesis Data Streams

You don’t provision shards though, it is automated by AWS

571
Q

How does DynamoDB streams work with LAmbda?

A
  • You need to define an Event Source Mapping to read from a DynamoDB stream
  • You need to ensure the Lambda function has the appropriate permissions
  • Your Lambda function is invoked synchronously
572
Q

What is Time to Live (TTL) in DynamoDB?

A
  • Automatically delete items after an expiry timestamp
  • Doesn’t consume any WCUs (ie, no extra cost)
  • The TTL attribute must be a n”Number” data type with “Unix Epoch timestamp” value
  • Expired items deleted within 48 hours of expiration
  • Expired items are deleted from both LSIs and GSIs
573
Q

In DynamoDB CLI, what is –projection-expression?

A

one or more attributes to retrieve

574
Q

In DynamoDB CLI, what is –filter-expression?

A

filter items before returned to you

575
Q

What are DynamoDB Transactions?

A
  • Coordinated, all-or-nothing operations (add/update/delete) to multiple items across one or more tables
  • Provides Atomicity, Consistency, Isolation and Durability (ACID)
  • Consumes 2x WCUs and RCUs - DynamoDB performs 2 operations for every item (prepare & commit)
576
Q

Calculate the WCUs required:

3 transactional writes per second, with item size 5KB

A

3 x (5KB / 1KB) x 2 (transactional costs) = 30 WCUs

577
Q

Calculate the RCUs required:

5 transaction reads per second, with item size 5KB

A

5 x (8KB / 4KB) x 2 (transactional cost) = 20 RCUs

%KB gets rounded to the upper 4KB = 8KB

578
Q

What is a DynamoDB partitioning strategy?

A
  • Imagine we have a voting application with 2 candidates. If partition key is “Candidate_ID”, this results into two partitions, which will generate issues (eg, Hot Partition)
  • A strategy that allows better distribution of items evenly across partitions
  • Add a suffix to Partition Key value
  • Two methods - sharding using random suffix, sharding using calculated suffix
579
Q

How do you do a table cleanup in DynamoDB?

A

Option 1 - Scan + DeleteItem:
- Very slow, consumes RCU and WCU, expensive

Option 2 - Drop Table + Recreate Table:
- Fast efficient, cheap

580
Q

How do you copy a DynamoDB table?

A

Option1 - Using AWS Data Pipeline:

Option 2: Backup and restore into a new table:
- Takes some time

Option 3:- scan + PutItem or BatchWriteItem:
- Write your own code

581
Q

What backup and restore feature is available for DynamoDB?

A

Point-in-time Recovery (PITR) like RDS
- No performance impact

582
Q

What is DynamoDB Global Tables?

A

Multi-region, multi-active, fully replicated, high performance

583
Q

What is DynamoDB local?

A

Develop and test apps locally without accessing the DynamoDB web service (without Internet)

584
Q

True or False; API Gateway supports the WebSocket Protocol?

A

True

585
Q

True or False; API Gateway can handle different environemnts (dev,text,prod)etc?

A

True

586
Q

In API Gateway, what can you import to quickly define APIs?

A

Swagger / Open API

587
Q

True or False; API Gateway can handle security (Authentication and Authorization)?

A

True

588
Q

True or False; API Gateway can cache API responses?

A

True

589
Q

True or False; API Gateway can handle request throttling?

A

True

590
Q

What are the main API Gateway integrations?

A

Lambda Function
- Invoke lambda as a function
- Easy way to expose REST API backend by LAmbda

HTTP:
- Expose HTTP endpoints in the backend
– Why? Add rate limiting, caching, user authentications, API keys, etc…

AWS Service:
- Expose any AWS API through the API Gateway
- Why? Add authentication, deploy publicly, rate control…

591
Q

3 Types of API Gateway endpoints?

A

Edge-Optimised (default):
- For global clients
- Requests are routed through the CloudFront Edge locations (improves latency)
- The API Gateway still lives in only one region

Regional:
- For clients within the same region
- Could manually combine with CloudFront (more control over the caching strategies and the distribution)

Private:
- Can only be accessed from your VPC using an interface VPC endpoint (ENI)
- Use a resource policy to define access

592
Q

How does API Gateway do user authentication?

A
  • IAM Roles (useful for internal applications)
  • Cognito (Identity for external users - example mobile users)
  • Custom Authoriser (your own logic)
593
Q

For API Gateway, how do you get Custom Domain Name HTTPS security?

A

Through integration with AWS Certificate Manager (ACM):
- If using Edge-Optimised endpoint, then the certificate must be in us-east-1
- If using Regional endpoint, the certificate must be in the API Gateway region
- Must setup CNAME or A-alias record in Route 53

594
Q

How do API Gateway deployment stages work?

A
  • Making changes in the API Gateway does not mean they’re effective
  • You need to make a “deployment” for them to be in effect
  • Changes are deployed to “stages” (as many as you want)
  • Use the naming you like for stages (dev,text,prod)
  • Each stage has its own configuration parameters
  • Stages can be rolled back as a history of deployments is kept
595
Q

In API Gateway, what are stage variables?

A
  • Stage variables are like environment variables for API Gateway
  • Use them to change often changing configuration values
  • They can be used in Lambda function ARN, HTTP endpoint, parameter mapping templates
  • Stage variables are passed to the “context” object in AWS Lambda
596
Q

For API Gateway, what are Canary Deployments?

A
  • Choose the % of traffic the canary channel receives
  • Metrics & Logs are separate (for better monitoring)
  • Possibility to override stage variables for canary
597
Q

4 API Gateway Integration Types?

A

-MOCK
- HTTP / AWS (Lambda & AWS Services)
- AWS_PROXY (Lambda Proxy)
- HTTP_PROXY

598
Q

What is the API Gateway MOCK Integration Type?

A

API Gateway returns a response without sending the request to the backend

599
Q

What is the API Gateway HTTP / AWS (Lambda & AWS Services) Integration Type?

A
  • you must configure both the integration request and integration response
  • Setup data mapping using mapping templates for the request & response
600
Q

What is the API Gateway AWS_PROXY (Lambda Proxy) Integration Type?

A
  • incoming request from the client is the input to Lambda
  • The function is responsible for the logic of request / response
  • No mapping template, headers, query string parameters… are passed as arguments
601
Q

What is the API Gateway HTTP_PROXY Integration Type?

A
  • No mapping template
  • The HTTP request is passed to the backend
  • The HTTP response from the backend is forwarded by API Gateway
602
Q

For API Gateway, what are mapping templates?

A
  • Used for LAmbda and HTTP integration
  • Mapping templates can be used to modify request / responses
  • Rename / modify query string parameters
  • Modify body content
  • Add headers
  • Uses Velocity Template Language (VTL): for loop, if etc…
  • Filter output results (remove unnecessary data)
603
Q

What is Swagger and Open API?

A

Common ways of defining REST APIs, using API definition as code

604
Q

True or False; you can import existing Swagger / OpeAPI 3.0 spec into API Gateway?

A

True

605
Q

What can Swagger be written in?

A

YAML or JSON

606
Q

What is the API Gateway default, min and max. TTL?

A
  • Default 300 seconds
  • Min: 0 s
  • Max. 3600 s
607
Q

Where are caches defined in API Gateway?

A

Caches are defined per stage

608
Q

What is the min and max cache size in API Gateway?

A

0.5GB to 237GB

609
Q

How do you invalidate an API Gateway cache?

A

Clients can invalidate the cache with header: Cache-Control: max-age=0

610
Q

In API Gateway, what if you don’t impose an InvalidateCache policy?

A

If you don’t impose an InvalidateCache policy (or choose the Require authorisation check box in the console), any client can invalidate the API Cache

611
Q

How do you configure a usage plan for API Gateway?

A

1, Create one or more APIs, configure the methods to require an API key, and deploy the API to stages

2, Generate or import API keys to distribute to application developers (your customers) who will be using your API

3, Create the usage plan with the desired throttle and quota limits

4, Associate API stages and API keys with the usage plan

Callers of the API must supply an assigned API key in the x-api-key header in requests to the API

612
Q

How many API Gateway requests can be made before throttling?

A

10,000 requests per second across all APIs

Soft limit can be increased upon request

613
Q

What response do you get if an API in API Gateway is throttled?

A

429 - too many requests

614
Q

What response do you get if an API in API Gateway is throttled?

A

429 - Quota exceeded, Throttle

615
Q

True or False; in API Gateway if one API is overloaded, if not limited, can cause the other APIs to be throttled

A

True

616
Q

In API Gateway, what does this error mean: 400

A

Bad Request

617
Q

In API Gateway, what does this error mean: 403

A

Access Denied, WAF filtered

618
Q

In API Gateway, what does this error mean: 502

A

Bad Gateway Exception: usually for an incomptible output returned from a Lambda proxy integration backend and occasionally for out-of-order invocations due to heavy workloads

619
Q

In API Gateway, what does this error mean: 503

A

Service unable exception

620
Q

In API Gateway, what does this error mean: 504

A

Integration FAilure - eg, Endpoint REquest Tomed-Out Exception (API Gateway requests time out after 29 seconds max.)

621
Q

For API Gateway, CORS must be enabled when you receive API calls from another domain?

A

True

622
Q

Regarding API Gateway and CORS, the OPTIONS pre-flight request must contain what headers?

A

-Access-Control-Allow-Methods
-Access-Control-Allow-Headers
-Access-Control-Allow-Origin

623
Q

True or False; you can create resource policies for API Gateway?

A

True

624
Q

True or FAlse; API Gateway resource policies can allow for Cross Account Access?

A

True

625
Q

3 ways security is implemented in API Gateway?

A
  • IAM
  • Customer Authorisaer
  • Cognito User pools
626
Q

What are WebSoeckets?

A
  • Two-way interactive communication between a user’s browser and a server
  • Server can push information to the client
  • This enables stateful application use cases
  • Often used in real-time applications
627
Q

True or False; API Gateway supports WebSocket API?

A

True

628
Q

For client-to-server messaging in API Gateway WebSockets, what is re-used?

A

ConnectID

629
Q

How do you set-up routing in API Gateway?

A

Using a Route Key Table

630
Q

What is AWS SAM?

A
  • SAM = Serverless Application Model
  • Framework for developing and deploying serverless applications
  • All the configuration is YAML code
  • Generate complex CloudFormation from simple SAM YAML file
  • Supports anything from CloudFormation (Outputs, Mappings, Parameters, Resources)
  • SAM can use CodeDeploy to deploy Lambda functions
  • SAM can help you to run Lambda, API Gateway, DynamoDB locally
631
Q

What is the SAM transform header?

A

Transform: ‘AWS::Serverless-2016-10-31

632
Q

What are the SAM template commands for package and deploy?

A
  • aws cloudfromation packages / sam package
  • aws cloudfromation deploy / sam deploy
633
Q

What are SAM policy templates?

A

List of templates to apply permissions to your Lambda functions

634
Q

How does SAM update Lambda functions?

A

SAM framework natively uses CodeDeploy to update Lambda functions

635
Q

What is SAM built on?

A

CloudFormation

636
Q

What sections are required by SAM?

A

Transform and Resources

637
Q

SAM commands to know for the exam?

A
  • sam build: fetch dependencies and create local deployment artifacts
  • sam package: package and upload to S3, generate CF template
  • sam deploy: deploy to CloudFormation
638
Q

What is the Serverless Application Repository (SAR)?

A
  • Managed repository for serverless applications
  • The applications are packaged using SAM
  • Build and publish applications that cabe re-used by organisation
  • Application settings and behaviour can be customised using Environment variable
639
Q

What AWS Cloud DEvelopemnt Kit (CDK)?

A
  • Define your cloud infrastructure using a familiar language (Javascript, python, java, .net)
  • Leverages CloudFormation
640
Q

How does the CDK work?

A
  • Contains high level compnents called constructs
  • The code is “compiled” into a CloudFromation template
  • You can therefore deploy infrastructure and application runtime code together (Grreat for Lambda functions and Docker containers)
641
Q

What is Amazon Cognito used for?

A

We want to give our users an identity so that they can interact with our application

642
Q

3 parts of Cognito?

A
  • Cognito user pools
  • Cognito Identity Pools (Federated Identity)
  • Cognito Sync
643
Q

What are Cognito User Pools?

A
  • Sign in functionality for app users
  • Integrate with API Gateway & Application Load Balancer
  • Database of users for your web and mobile application
644
Q

What is Cognito Identity pool (Federated Identity)?

A
  • Provide temporary AWS credentials to users so they can access AWS resources directly
  • Integrate with Cognito User Pools as an identity provider
  • Users are mapped to IAM roles & policies,, can leverage policy variables
645
Q

What is Cognito Sync?

A
  • Synchronise data from device to Cognito
  • Is depreciated and replaced by AppSync
  • Store preferences, configuration ,state of app
  • ross device synchronisation
  • Offline capability
646
Q

Cognito USer Pools can invoke a Lambda function synchronously on which triggers?

A

Authentication events:
- Pre authentication Lambda trigger
- Post authentication lambda trigger
- Pre token Generation Lambda trigger

Sign-up:
- Pre sign-up Lambda trigger
- Post confirmation Lambda trigger
- Migrate User lambda trigger

Messages:
- Custom message Lambda trigger

Token Creation:
- Pre token generation Lambda trigger

647
Q

True or False; Cognito has a hosted authentication UI that you can add to your app to handle sign-up and sign-in workflows?

A

True

648
Q

Which identity sources can be used for Cognito Identity Pools?

A
  • Public providers (Loginwith Amazon, Facebook, Google, Apple)
  • Users in an Amazon Cognito user pool
    -OpenID Connect Providers & SAML Identity Providers
  • Developer Authenticated Identities (custom login erver)
  • Cognito Identity pools allow for unauthenticated (guest) access
649
Q

How do Cognito Identity Pools obtain IAM credentials?

A

Through STS

650
Q

In Cognito Identity Pools - What IAM roles are given for authenticated and guest users?

A
  • Default IAM roles for authenticated and guest users
  • Define rules to choose the role for each user based on the user’s ID
651
Q

What is Cognito Sync - Cognito stream?

A

Steam data from Cognito into Kinesis

652
Q

What is Cognito Sync - Cognito events?

A

Execute lambda functions in response to events

653
Q

What are AWS Step Functions?

A
  • Model your workflow as state machines (one per workflow)
  • Written in JSON
  • Visualsisation of the workflow and the execution of the workflow, as well as the history
  • Start workflow with SDK call, API Gateway, Event Bridge
654
Q

6 AWS Step Function states?

A
  • Choice state: test for a condition to send to a branch (or default branch)
  • Fail or succeed state - stop execution with failure or success
  • Pass state - simply pass ints input to its output or inject some fixed data, without performaing work
  • Wait state: provide a delay for a certain amount of time or until a specified time/date
  • Map state : dynamically iterate steps
  • Parallel state: begin parallel branches of execution
655
Q

How to handle erros in AWS Step Functions?

A

Use RETRY (to retry failed state) and CATCH (transition to failure path) in the state machine to handle the error instead of inside the application code

  • Evaluated from top to bottom
656
Q

What are the two types of Step Function worflows?

A

Standard and Express

657
Q

For Step Function Standard Workflows, what is the max. duration?

A

1 year

658
Q

For Step Function Standard Workflows, what is the supported execution start rate?

A

Over 2,000 per second

659
Q

For Step Function Standard Workflows, what is the support state transition rate?

A

Over 4,000 per second per account

660
Q

For Step Function Standard Workflows, what is the pricing?

A

Priced per state transition. A state transition is counted each time a step in your execution is completed

661
Q

For Step Function Standard Workflows, what is the pricing?

A

Priced per state transition. A state transition is counted each time a step in your execution is completed

662
Q

For Step Function Standard Workflows, how is execution history viewed?

A

Executions can be listed and descried with Step Functions APIs, and visually debugged through the console. They can also be insepected in CloudWatch Logs by enabling logging on your state machine

663
Q

For Step Function Standard Workflows, what are the execution semantics?

A

exactly-once workflow execution

664
Q

For Step Function Express Workflows, what is the maximum duration?

A

5 mins

665
Q

For Step Function Express Workflows, what is the supported execution start rate?

A

over 100,000 per second

666
Q

For Step Function Express Workflows, what is the supported state transition rate?

A

Nearly unlimited

667
Q

For Step Function Express Workflows, what is the pricing?

A

Priced by the number of executions your run, their duration, and memory consumption

668
Q

For Step Function Express Workflows, how is execution history viewed?

A

Executions can be inspected in CloudWatch Logs by enabling logging on your state machine

669
Q

For Step Function Express Workflows, what are the execution semantics

A

At least once workflow execution

670
Q

What is AWS AppSync?

A
  • AppSync is a manged service that uses GraphQL
  • GraphQL makes it easy for applications to get exactly the data they need
  • This includes combining data from one or more sources
  • Retrieve data in real-time with WebSocket or MQTT on WebSocket
    -For mobile apps: local data access & data synchronisation
  • It all starts with uploading one GraphQL schema
671
Q

What are the four ways in wehich you can authorisae applications to interact with your AWS AppSync GraphQL API?

A
  • API_KEY
  • AWS_IAM: IAM users / roles / cross-account access
  • OPENID_CONNECT: OpenID Connect provider / JSON Web Token
  • AMZON_COGNITO_USER_POOLS
672
Q

What is Amplify studio?

A

Visually build a full-stak app, both front-end UI and a back-end

673
Q

What is Amplify libraries?

A

Connect your app to existing AWS Services (Cognito, S3 and more)

674
Q

What is Amplify CLI?

A

Configure an Amplify backend. With a guided CLI workflow

675
Q

What is AWS Amplify?

A
  • Set of tools to get started with creating mobile and web applications
  • “Elastic Beanstalk for mobile and web applications”
  • Must-have features such as data storage, authentication, storage and machine-learning, all powered by AWS services
676
Q

How is authentication done in AWS Amplify?

A
  • Leverages Amazon Cognito
  • User registration, authentication, account recovery & other operations
  • Supports MFA, Social Sign-in, etc
  • Pre-built UI components
  • Fine-grained authorisation
677
Q

How is data stored using AWS Amplify?

A
  • Leverages AppSync and DynamDB
  • Work with local data and have automatic synchronisation to the cloud without complex code
  • Powered by graphQL
  • Offline and real-time capabilities
678
Q

What is AWS STS?

A
  • Secure Token Service (STS)
  • Allows to grant limited and temporary access to AWS resources
679
Q

What is the max time temporary access is granted to AWS resrouces from STS?

A

up to 1 hour

680
Q

7 STYS API calls?

A
  • AssumeRole: Assume roles within your account or cross account
  • AssumeRoleWithSAML: reteurn credentials for users logged with SAML
  • AssumeRoleWithWebIdentity: return creds for user logged with an IdP. AWS recommends against using this, and using Cognito Identity Pools instead
  • GetSessionToken: for MFA, from a user or AWS account root user
  • GetFederationToken: obtain temporary creds for a federated user
  • GetCAllerIdentity: return details about the IAM user or role used in the API call
  • DecodeAuthorisationMessage: decode error message when an AWS API is denied
681
Q

How can you use STS to Assume an IAM Role?

A
  • Define an IAM Role within your account or corss-account
  • Define which principals can access this IAM Role
  • Use AWS STS to retrieve credentials and impersonate the IAM Role you have have access to (AssumeRoleAPI)
  • Temporary credentials can be valid between 15 minutes to 1 hour
682
Q

How can you use STS to Assume an IAM Role?

A
  • Define an IAM Role within your account or cross-account
  • Define which principals can access this IAM Role
  • Use AWS STS to retrieve credentials and impersonate the IAM Role you have access to (AssumeRoleAPI)
  • Temporary credentials can be valid between 15 minutes to 1 hour
683
Q

How are IAM Policies authorisation evaluated?

A

1, If there’s an explicit DENY, end decision with DENY
2, If there’s an ALOLOW, end decision with ALLOW
3, Else DENY

684
Q

What can IAM Policies be attached to?

A
  • Users
  • Roles
  • Groups
685
Q

True or False; you can create dynamic IAM polcies?

A

True

686
Q

What is the special policy variable for creating dynamica policies with IAM?

A

${aws:username}

687
Q

How do you grant a USer permissions to pass a role to an AWS Service?

A
  • To configure many AWS services, you must pass an IAM role to the service (this happens only once during setup)
  • The service will later assume the role and perform actions
  • For this, you need to IAM permission iam:PAssRole
  • It often comes with iam:GetRole to view the role being passed
688
Q

What is Microsoft Active Directory (AD)?

A
  • Found on any Windows Server with AD Domain Services
  • Database of objects: User Accounts, Computers, Printers, File Shares, Security Groups
  • Centralised security management, create account, assign permissions
  • Objects are organised in trees
  • A group of trees is a forest
689
Q

3 types of AWS Directory Services?

A
  • AWS Managed Microsft AD
  • AD Connector
  • Simple AD
690
Q

What is AWS MAnaged Microsoft AD?

A
  • Create your own AD in AWS, manage users locally, supports MFA
  • Establish “trust” connections with your on-premises AD
691
Q

What is AD Connector?

A
  • Directory Gateway (proxy) to redirect to on-premises AD, supports MFA
  • Users are managed on the on-premises AD
692
Q

What is Simple AD?

A
  • AD-compatible managed directory on AWS
  • CAnnot be joined with on-premises AD
693
Q

In the exam, anytime you hear “encryption” for an AWS service, what should you think?

A

KMS

694
Q

What is KMS?

A
  • AWS manages encryption keys fo rus
  • Fully integrated with IAM for authorisation
  • Easy way to control access to your data
  • Able to audit KMS key usage using CloudTrail
  • Seamlessly integrated into most AWS
695
Q

What are the 2 KMS key types?

A
  • Symmetric (AES-256 keys)
  • Asymmetric (RSA & ECC key pairs)
696
Q

What are KMS symmetric keys?

A
  • Single encryption key that is used to encrypt and decrypt
  • AWS services that are integrated with KMS use Symmetric CMKs
  • You never get access to the KMS Key unencrypted (must call KMS API to use)
697
Q

What are KMS Asymmetric keys?

A
  • Public (encrypt) and private key (Decrypt) pair
  • Used for encrypt / decrypt, or sign/verify operations
  • The public key is downloadable, but you can’t access the Private Key unencrypted
698
Q

3 Types of KMS keys?

A
  • AWS Managed key: free
  • Customer Managed Keys (CMK): created in KMS $1 / month
  • Customer Managed Keys: imported $1 / month
699
Q

True or False; KMS API calls are free?

A

False; $0.03 / 10,000 cals

700
Q

Do KMS keys have automatic rotation?

A
  • AWS managed KMS keys: automatic every 1 year
  • Customer-managed KMS keys: (must be enabled) automatic every 1 year
  • Imported KMS key: only manual rotation possible using alias
701
Q

What are KMS key policies?

A
  • Control access to KMS keys, “similar” to S3 bucket policies
  • Difference: you cannot control access without them
702
Q

What is the default KMS key policy?

A
  • Created if you don’t provide a specific KMS Key Policy
  • Complete access to the key to the root user = entire AWS account
703
Q

What are custom KMS key policies?

A
  • Define users, roles that can access the KMS key
  • Define who can administer the key
  • Useful for cross-account access of your KMS keys
704
Q

What is the KMS Encrypt API call limit size?

A

4 KB, if you want to encrypt >4KB, we need to use eenvelope encryption

705
Q

What is the main API for envelope encryption?

A

GenerateDataKey API

706
Q

What is the Encryption SDK?

A
  • The AWS Encryption SDK impemented Envelop Encryption for us
  • The Encryption SDK also exists as a CLI tool we can install
707
Q

What is an important feature of tthe Encryption SDK?

A

Data Key Caching:
- re-use keys instead of creating new ones for each encryption
- Helps with reducing the number of calls to KMS with a security trade-off
- Use LocalCryptoMaterialsCache

708
Q

5 KMS symmetric API calls?

A

Encrypt: encrypt up to 4KB of data through KMS

GenerateDataKey: generates a unique symmetric data key (DEK)

GerateDataKeyWithoutPlaintext: Generate a DEK to use at some point

Decrypt: decrypt up to 4KB of data (including Data Encryption Keys)

GenerateRandom: returns a random byte string

709
Q

What happens when you exceed a request quota?

A

You get a ThrottlingException.

To respond, use exponential backoff

710
Q

What is the S3 Bucket Key for SSE-KMS encrpytion?

A
  • New setting to decrease number of API calls made to KMS from S£ by 99%
  • This leverages data keys. A S3 bucket key is generated and that key is used to encrypt KMS objects with new data keys
  • You will see less KMS CloudTail events in CloudTail
711
Q

What is SSM Parameter Store?

A
  • Secure storage for configuration and secrets
  • Optional seamless encryption using KMS
  • Version tracking of configuration / secrets
  • Hierarchical storage
  • Simple API
  • No secret rotation
  • Optional KMS encryption
712
Q

What are Parameter store - parameter policies?

A
  • Allow to assign a TTL to a parameter (expiration date) to force updating or deleting sensitive data such as passwords
713
Q

What is AWS Sectrets MAnager?

A
  • Newer service, meant for storing secrets
  • Mostly meant for RDS integration
  • Capability to force rotation of secrets every X days
  • Automate generation of secrets on rotation
  • Integration with RDS
  • Secrets are encrypted using KMS (madatory)
714
Q

Can CloudWatch Logs be encrypted?

A
  • You can encrypt CloudWatch logs with KMS keys
  • Encryption is enabled at the log group level, by associating a CMK with a log group, either when you create the log group or after it exists
  • You must use the CloudWatch Logs API - associate-kms-key & create-log-group
715
Q

What is AWS Redshift?

A
  • OLAP - analytic processing
  • Datawarehousing / Data Lakes
  • Analytics queries
716
Q

What is AWS Neptune?

A

Graph Database

717
Q

What is DocumentDB?

A

Managed MongoDB for AWS

718
Q

What is AWS CErtificate MAnager (ACM)?

A
  • Lets you easily provision, manage and deploy SSL/TLS certificates
  • USed to provide in-flight encryption for wwebsites (HTTPS)
  • Supports both public and private TLS certificates
  • Automatic TLS certificate renewal
  • Integrates with ELBs, CloudFront Distributions, APIs on API Gateway
719
Q

What is AWS Cloud Map?

A
  • A fully managed resource discovery service
  • Creates a map of the backend services / resources that your applications depend on
  • You register your application components, their location, attributes, and health status with the AWS Cloud Map
  • Integrated health checking
720
Q

Whata is AWS FAult Injection Simulator (FIS)?

A
  • A fully managed service for runing fault injection experiements on AWS workloads
  • Based on chaos engineering - stressing an application by creating disruptive events, observing how the system responds and implementing improvement
  • Helps you uncover hidden bugs and performance bottlenecks
  • Use pre-built templates that generate the desired disruptions
721
Q

What is AWS DataSync?

A

Move large amounts of data to and from:
- On-premises / other cloud to AWS - needs agent
- AWS to AWS - no agent needed

  • Replication tasks can be scheduled hourly, daily, weekly
  • File permissions and metadata are preserved
  • One agent task can use 10 Gbps, can setup a bandwidth limit
722
Q

What can AWS DataSync synchronise to?

A
  • S3
  • EFS
  • FSx
723
Q

Which section of a CloudFormation template does not allow for conditions?

A

Parameters

724
Q

True or False; CloudWatch integrates with S3?

A

True

725
Q

True or False; ECS supports dynamic port mapping?

A

True,you can use dynamic port maping to support multiple tasks from a single service on the same container instance

726
Q

CloudFront or Application Load Balancer can be used to securely authenticate users for accessing your applications?

A

ALB

727
Q

You are a DynamoDB developer for an aerospace company that requires you to write 6 objects per second of 4.5KB in size each.

What write capacity unit is needed for your project?

A

30

728
Q

What can you use to ensure that a lambda function can always reach a certain level of concurrency?

A

Reserved concurrency

729
Q

What is reserved concurrency for lambda functions?

A
  • To ensure that a function can always reach a certain level of concurrency, you can configure the function with reserved concurrency.
  • When a function has reserved concurrency, no other function can use that concurrency.
  • More importantly, reserved concurrency also limits the maximum concurrency for the function, and applies to the function as a whole, including versions and aliases.
730
Q

True or False; provisioned concurrency can be used to limit the maximum concurrency for a given Lambda function?

A

False

731
Q

What is provisioned concurrency used for in lambda functions?

A

You should use provisioned concurrency to enable your function to scale without fluctuations in latency.

732
Q

In ECS, if you want two containers to use shared memory, should they go into separate task definitions, or a single task definition?

A

Single task definition

733
Q

True or False; You can configure a Lambda function to connect to private subnets in a virtual private cloud (VPC) in your account?

A

True

734
Q

True or False; you can configure a Lambda function to connect to private subnets in a virtual private cloud (VPC) in your account?

A

True

735
Q

True or FAlse; With Application Load Balancers, cross-zone load balancing is always enabled?

A

True

736
Q

True or False; if you terminate a container instance while it is in the STOPPED state, that container instance isn’t automatically removed from the cluster?

A

True; 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.

737
Q

True or False; if you terminate a container instance while it is in the RUNNING state, that container instance isn’t automatically removed from the cluster?

A

False; if you terminate a container instance in the RUNNING state, that container instance is automatically removed, or deregistered, from the cluster.

738
Q

True or False; auto scaling groups span across availability zones and AWS regions?

A

False; they span across availability zones, but not regions

739
Q

What does a ProjectionExpression do in DynamoDB?

A

A projection expression is a string that identifies the attributes you want.

To retrieve a single attribute, specify it’s name. For multiple attribute, the names must be comma-separated

740
Q

In DynamoDB, what is the FilterExpression used for?

A

If you need to further refine the Query results, you can optionally provide a filter expression

741
Q

In DynamoDB, what does the –query parameter do?

A

–query finds items based on primary key values

742
Q

In DynamoDB, what does the Scan operation do?

A

Reads every item in a table or a secondary index

743
Q

By default, what type, is the health check configuration of your Auto Scaling Group set to?

A

EC2 typew. To automate te replacement of unhealthy EC2 instances, you must change the health check type of your instane’s auto scaling group from EC2 to ELB by using a configuration file

744
Q

What is an organisation tail?

A

In AWS Organisations you can create a trail that will log all events for all AWS accounts in that organsation

745
Q

True or False; member accounts will be able to see the organisation trail, but cannot modify or delete it?

A

True

746
Q

True or False; IAM roles and resource-based policies can delegate access across accounts only within different partitions?

A

False; IAM roles and resource-based policies delegate access across accounts only within a single partition

747
Q

In ECS, how do you register a container instance with a cluster?

A

Update the cluster name parameter in the /etc/ecs/ecs.config file

748
Q

In CloudFormation, which intrinsic function returns the value of an output exported by another stac?

A

!ImportValue

749
Q

In CloudFormation what does this intrinsic function do !Ref?

A

Returns the value of the specified parameter or resource

750
Q

In CloudFormation what does this intrinsic function do !GetAtt?

A

Returns the value of an attribute from a resource in the template.

751
Q

True or False; EBS volumes do not support in-flight encryption but do support encryption at rest using KMS?

A

False; EBS volumes support both in-flight encryption and encryption at rest using KMS

752
Q

True or False; in S3, if two writes are made to a single non-versioned object at the same time, it is possible that only a single event notification will be sent?

A

True

753
Q

In CloudFormation, how do you create a cross-stack reference?

A

Use the Export output field to flag the value of a resource output for export. Then, use the Fn::ImportValue instrinsic function to import the value

754
Q

Simple Work Flow (SWF) is synchronous or Asynchronous?

A

Asynchronous

755
Q

True or False; EC2 Auto Scaling ensures that the new capacity never goes outside of the min. and max. size limits?

A

True

756
Q

During a rollback which instances does CodeDeploy deploy first to?

A

The failed instances

757
Q

True or False; you can update the cache and the backend at the same time?

A

False; The cache and the backend cannot be updated at the same time via a single atomic operation as these are two separate systems.

758
Q

True or False; Lambda aliases can point to other aliases?

A

False; lambda aliases can only point to a lambda function version

759
Q

True or False; by default, scripts entered as user data do not have root user privileges for executing?

A

False; they do have root user privileges

760
Q

What does Parameter Store use to encrypt and decrypt the parameter values of SecureString parameters?

A

AWS KMS

761
Q

True or False; applications running outside of an AWS environment will need access keys for programmatic access to AWS resources?

A

True

762
Q

True or False; An IAM user’s username and password can only be used to interact with AWS via its Management Console?

A

True

763
Q

In X-Ray, what are annotations ?

A

Annotations are simple key-value pairs that are indexed for use with filter expressions. Use annotations to record data that you want to use to group traces in the console, or when calling the GetTraceSummaries API. X-Ray indexes up to 50 annotations per trace.

764
Q

True or False; you can use a self-signed certificate for HTTPS communication between CloudFront and your origin?

A

False

765
Q

For API Gateway to pass the Lambda output as the API response to the client, the Lambda function must return the result in which format?

A

JSON

766
Q

What are Elastic Beanstalk worker environments?

A

It helps process task asynchronously by managing the SQS queue and worker instances by running a daoemon process

767
Q

What does the ‘require authorisation’ checkbox do in the settings tabs on API Gateway?

A

Ticking the Require authorization checkbox ensures that not every client can invalidate the API cache

768
Q

In the Lambda Invoke API, you have 3 options to choose from for the InvocationType, what are they?

A

RequestResponse (default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.

Event – Invoke the function asynchronously. Send events that fail multiple times to the function’s dead-letter queue (if it’s configured). The API response only includes a status code.

DryRun – Validate parameter values and verify that the user or role has permission to invoke the function.

769
Q

In CodeDeploy, how do Canary deployments work?

A
  • Traffic is shifted in two increments.
  • You can choose from predefined canary options. The options specify:
    1, the percentage of traffic that’s shifted to your updated Lambda function version in the first increment
    2, the interval, in minutes, before the remaining traffic is shifted in the second increment.
770
Q

What does this mean: CodeDeployDefault.LambdaCanary10Percent5Minutes?

A

It’s a CodeDeploy lambda canary deployment where:
- 10 percent of your customer traffic is immediately shifted to your new version.
- After 5 minutes, all traffic is shifted to the new version.

This means that the entire deployment time will only take 5 minutes

771
Q

In DynamoDB what is a secondary index?

A

A secondary index is a data structure that contains a subset of attributes from a table, along with an alternate key to support Query operations.

772
Q

In DynamoDB, what is the difference between a “Global secondary index” and a “local secondary index”?

A

Global secondary index — an index with a partition key and a sort key that can be different from those on the base table.

Local secondary index — an index that has the same partition key as the base table, but a different sort key. Local secondary indexes are created when the main table is created

773
Q

4 types of RDS MySQL export logs?

A
  • Audit
  • Error
  • General
  • Slow query
774
Q

In CloudWatch metrics, what are the 2 resolutions and what is their granularity?

A

– Standard resolution, with data having a one-minute granularity
– High resolution, with data at a granularity of one second

775
Q

True or False; IAM DB authentication rotates credentials by default?

A

False; it can’t rotate credentials

776
Q

True or False; Cognito Identity pools supports unauthenticated identities?

A

True

777
Q

In DynamoDB, what is a projection expression?

A

If you don’t what to retrieve all attributes from a query, use a projection expression to specify the attributes you want

778
Q

How can a client of your API Gateway invalidate an existing cache entry?

A

Have the client send a request with the Cache-Control: max-age=0 header.

779
Q

When to choose memcached over redis for ElastiCache?

A

You can choose Memcached over Redis if you have the following requirements:

– You need the simplest model possible.

– You need to run large nodes with multiple cores or threads.

– You need the ability to scale out and in, adding and removing nodes as demand on your system increases and decreases.

– You need to cache objects, such as a database.

780
Q

What is the integration type ‘AWS’ used for in API Gateway?

A

only used for Lambda custom integration

781
Q

In a SAM template, how do you define a nested application resource type?

A

AWS::Serverless::Application

782
Q

True or False; the name of the bucket used for Transfer Acceleration must be DNS-compliant and must not contain periods (“.”)?

A

True

783
Q

True or False; for DynamoDB, creating a local secondary index is more effecient than scanning a whole table and discarding irrelevant items?

A

True

784
Q

What is the is the recommended way to consume streams from DynamoDB for real-time processing?

A

Kinesis Adapter

785
Q

What are CodeDeploy in-place deployments?

A

The application on each instance in the deployment group is stopped, the latest application revision is installed, and the new version of the application is started and validated

786
Q

True or False; In CodeDeploy, Lambda compute platform deployments can use an in-place deployment type?

A

False

787
Q

Where can CodeDeploy deploy to?

A
  • EC2 instances
  • On-premises instances
  • Lambda
  • ECS services
788
Q

What protocol does CodeDeploy use to communicate?

A

HTTPS on port 443

789
Q

What protocol and port does X-Ray listen for traffic?

A

UDP on port 2000

790
Q

What is Optimistic locking ?

A

Optimistic locking is a strategy to ensure that the client-side item that you are updating (or deleting) is the same as the item in DynamoDB. If you use this strategy, then your database writes are protected from being overwritten by the writes of others — and vice-versa.

791
Q

What is a CloudWatch namespace?

A

A namespace is a container for CloudWatch metrics. Metrics in different namespaces are isolated from each other

792
Q

What is envelope encryption?

A

Envelope encryption is the practice of encrypting plaintext data with a data key and then encrypting the data key under another key.

793
Q

What is a top-level plaintext master key?

A

The envelope encryption master key that is plaintext (unencrypted)

794
Q

In S3 server-side encryption with customer key, what headers are required when uploading an item?

A
  • x-amz-server-side-encryption-customer-algorithm
  • x-amz-server-side-encryption-customer-key
  • x-amz-server-side-encryption-customer-key-MD5
795
Q

For X-Ray what does the GetTraceSummaries API do?

A

Gets a list of trace IDs of the application

796
Q

For X-ray what does the BatchGetTraces API call do?

A

Returns the the traces for all the trace IDs specified in the call

797
Q

What is the API call to deploy the new version to Elastic Beanstalk via the CLI?

A

eb deploy

798
Q

What is an EC2 Spot Fleet?

A

A Spot Fleet is a set of Spot Instances and optionally On-Demand Instances that is launched based on criteria that you specify

799
Q

After you attach an EBS volume to an EC2 instance, what is the next step?

A

Create a file system on the volume

800
Q

What is the unreserved concurrency pool for Lambda functions?

A

AWS Lambda will keep the unreserved concurrency pool at a minimum of 100 concurrent executions, so that functions that do not have specific limits set can still process requests. So, in practice, if your total account limit is 1000, you are limited to allocating 900 to individual functions.

801
Q

When is an atomic counter not useful?

A

An atomic counter would not be appropriate where overcounting or undercounting cannot be tolerated (For example, in a banking application). In this case, it is safer to use a conditional update instead of an atomic counter.

802
Q

What is the IAM policy simulator?

A

The IAM policy simulator evaluates the policies that you choose and determines the effective permissions for each of the actions that you specify.

803
Q

In X-Ray, what are annotations used for?

A

annotations object with key-value pairs that you want X-Ray to index for search.

804
Q

In X-Ray, what do you use metadata for?

A

metadata object with any additional data that you want to store in the segment.

805
Q

What is the environment configuration file that should added in the source bundle of an elastic beanstalk app

A

env.yml

806
Q

C++ is supported in lambda?

A

Yes, but through a custom runtime

807
Q

In an S3 bucket CORS header file, what is the MaxAgeSeconds field?

A

Specifies the amount of time in seconds that the browser caches an Amazon S3 response to a preflight OPTIONS request for the specified resource.

808
Q

What are cluster queries?

A

Cluster queries are expressions that enable you to group objects.

809
Q

For Lambda functions that process Kinesis or DynamoDB streams, what is the important factor for calculating concurrency?

A

For Lambda functions that process Kinesis or DynamoDB streams, the number of shards is the unit of concurrency. If your stream has 100 active shards, there will be at most 100 Lambda function invocations running concurrently. This is because these streams are pull based, not push based, such as API Gateway for example

810
Q

For Lambda functions that process Kinesis or DynamoDB streams, what is the important factor for calculating concurrency?

A

For Lambda functions that process Kinesis or DynamoDB streams, the number of shards is the unit of concurrency. If your stream has 100 active shards, there will be at most 100 Lambda function invocations running concurrently. This is because these streams are pull based, not push based, such as API Gateway for example

811
Q

What is detailed monitoring in CloudWatch?

A

Sending EC2 instance data every 1-minute

812
Q

What is In-Place Deployment?

A

The application on each instance in the deployment group is stopped, the latest application revision is installed, and the new version of the application is started and validated.

813
Q

What deployments can CodeDeploy do?

A

In-Place:
- EC2/On-Premises

Blue/Green
- EC2
- Lambda
- ECS

814
Q

True or False; Local Secondary Indexes can can added to existing DynamoDB tables?

A

False; they must be set-up when the table is created

815
Q

How do you increase CPU in Lambda?

A

You cannot manually configure the CPU settings of your function. You have to increase the memory configuration of your function instead.

816
Q

What is the DyanamoDB Transactions feature?

A

DynamoDB Transactions feature simply provides developers atomicity, consistency, isolation, and durability (ACID)

817
Q

What is Systems Manager State Manager?

A

Automates the process of keeping your EC2 and hybrid infrastructure in a state that you define

818
Q

True or FAlse; canary deployment is available in Elastic Beanstalk?

A

FAlse

819
Q

What are AWS CloudFormation StackSets?

A

AWS CloudFormation StackSets extends the functionality of stacks by enabling you to create, update, or delete stacks across multiple accounts and regions with a single operation.

820
Q

When should you use a Global Secondary Index (GSI)?

A

global secondary index (GSI) is primarily used if you want to query over the entire table, across all partitions.

821
Q

Do Local and Global Secondary indexes support eventual and strongly consistent reads?

A

Local secondary index support both, global secondary indexes only support eventual

822
Q

With RDS, what is transparent data encryption?

A

Use to automatically encrypt data before it is written to storage, and automatically decrypts data when is read from storage

823
Q

Which AWS service should be used service to coordinate multiple AWS services into serverless workflows?

A

AWS Step Functions

824
Q

What is a Blue/Green deployment?

A
825
Q

True or FAlse; API Gateway exposes HTTP and HTTPS endpoints?

A

False; only HTTPS

826
Q

True or False; it is best practice to separate the Lambda handler (entry point) from your core logic?

A

True

827
Q

How do you properly instrument an EC2 instance to use the X-Ray daemon?

A

Use a user data script to install the X-Ray daemon.

828
Q

In SWF, what are markers?

A

You can use markers to record events in the workflow execution history for application specific purposes. Markers are useful when you want to record custom information

829
Q

Trueor False; automatic key rotation is available in KMS for keys in custom key stores?

A

False

830
Q

True or False; Cognito Identity Pool can be used as an authorizer for API Gateway?

A

False, use Cognito user pool instead

831
Q

What are Trust Policies?

A

Trust policies define which principal entities (accounts, users, roles, and federated users) can assume the role.

832
Q

What programming languages does lambda natively support?

A
  • python
  • Go
  • Ruby
  • C#
    -Powerscript
  • Node.js
  • Java
833
Q

What does Cognito pass to the user to provide a set of temporary, limited-privilege AWS credentials?

A

Cognito ID