AWS Cloudfront & Global Accelerator Flashcards

1
Q

What is Amazon CloudFront?

A

A Content Delivery Network (CDN) that improves the performance of content delivery by caching content at edge locations globally, reducing latency for users worldwide.

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

How does CloudFront improve user experience?

A

Caching content at edge locations near users for faster access.

Reducing latency by avoiding the need to retrieve content from the origin for repeated requests.

DDoS protection by distributing traffic globally and integrating with AWS Shield and Web Application Firewall.

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

What are the main types of origins CloudFront supports?

A

S3 Buckets: For distributing static files.

Custom HTTP Backends: Such as Application Load Balancers, EC2 instances, or S3 static websites.

S3 for Ingress: For uploading files to an S3 bucket through CloudFront.

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

How does CloudFront caching work?

A

A client requests content from an edge location.
If the content is in the cache, it is served immediately.
If not, the edge location fetches the content from the origin (e.g., S3 bucket).
The fetched content is cached locally at the edge for future requests.

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

What is required to secure an S3 bucket with CloudFront?

A

Use Origin Access Control (OAC) to ensure only CloudFront can access the S3 bucket.
Modify the S3 bucket policy to allow access only from the OAC.

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

What is required for CloudFront to access an EC2 instance directly?

A

Public EC2 instance: The instance must have a public IP because CloudFront does not have private VPC connectivity.

Security Group Configuration: The security group of the EC2 instance must allow incoming requests from the public IPs of CloudFront edge locations.

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

How can CloudFront access EC2 instances indirectly using an Application Load Balancer (ALB)?

A

Public ALB: The ALB must have a public IP to connect with CloudFront.

Private EC2 Instances: The backend EC2 instances can remain private within a VPC.

Security Group Rules:
ALB’s security group must allow traffic from CloudFront’s public IPs.
EC2 instances’ security group must allow traffic from the ALB’s security group.

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

Why must EC2 instances or ALBs be public for CloudFront to connect?

A

CloudFront edge locations do not have private VPC connectivity, so the origin (EC2 or ALB) must be publicly accessible.

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

What are the advantages of using an ALB with CloudFront instead of direct EC2 instance access?

A

Private Backend: EC2 instances can remain private within the VPC.
Load Balancing: Distribute traffic across multiple EC2 instances.
Simplified Security: Only need to allow ALB’s security group in EC2 security group.

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

What is CloudFront Geo Restriction?

A

A feature that restricts access to your CloudFront distribution based on the country of the requester’s IP address.

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

What are the two types of Geo Restriction lists in CloudFront?

A

Allowlist: Grants access only to the specified countries.
Blocklist: Denies access to the specified countries.

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

What is a common use case for Geo Restriction?

A

Enforcing copyright laws to control access to content based on geographic regions.

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

Why do CloudFront edge locations have different pricing?

A

The cost of data transfer out varies by geographic region due to differences in operational costs.

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

What are CloudFront Price Classes?

A

Price Classes allow you to choose a subset of edge locations to reduce costs.

Price Class All: Uses all edge locations globally for best performance.
Price Class 200: Excludes the most expensive regions (e.g., India, South America).
Price Class 100: Limits edge locations to the least expensive regions (e.g., North America, Europe).

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

What happens when CloudFront’s cache TTL expires?

A

When the TTL (Time-to-Live) expires, CloudFront fetches updated content from the backend origin (e.g., S3 bucket).

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

Why might cache invalidation be necessary in CloudFront?

A

If content is updated in the backend origin, CloudFront’s edge locations won’t automatically reflect those changes until the cache TTL expires. Invalidation forces an immediate refresh of the cached content.

17
Q

What happens when you invalidate specific files like /index.html and /images/*?

A

CloudFront removes the invalidated files from the cache at edge locations.
The next time a user requests the file, CloudFront fetches it from the origin and caches the updated version.

18
Q

What is the benefit of cache invalidation in CloudFront?

A

It ensures that updated content from the backend origin is served immediately, rather than waiting for the cache TTL to expire.

19
Q

What is the main problem that AWS Global Accelerator solves?

A

It improves the performance and availability of global applications by routing traffic over the AWS global network, reducing latency and the number of hops compared to public internet routing.

20
Q

How does AWS Global Accelerator use Anycast IPs?

A

Global Accelerator assigns two Anycast IP addresses that are globally reachable. Traffic is routed to the nearest edge location based on the user’s geographic location, improving latency.

21
Q

What is the difference between Unicast IP and Anycast IP?

A

Unicast IP: One server holds one IP address; clients are routed to a specific server.
Anycast IP: Multiple servers share the same IP address; clients are routed to the nearest server.

22
Q

How does traffic flow with AWS Global Accelerator?

A

Traffic is routed from the nearest edge location over the AWS private network to the backend application, minimizing latency and avoiding the public internet.

23
Q

What services can AWS Global Accelerator work with?

A

Global Accelerator works with Elastic IPs, EC2 instances, Application Load Balancers (ALB), and Network Load Balancers (NLB), which can be public or private.

24
Q

What are the advantages of using AWS Global Accelerator for your application?

A

Consistent performance with intelligent routing to low-latency edge locations.
Fast regional failover with automated recovery.
Built-in DDoS protection through AWS Shield.
Health checks to ensure the application remains available.