CloudFront And Elastic Beanstalk Flashcards

1
Q

What is CloudFront?

A

A CDN that improves content delivery using edge caching and integrates with Shield and WAF.

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

What are CloudFront origins?

A

S3 Buckets, ALB, EC2, S3 website, or any HTTP backend.

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

What is the difference between CloudFront and S3 Cross Region Replication?

A

CloudFront caches globally for performance; S3 CRR replicates objects for availability in multiple regions.

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

What is a CloudFront Cache Key?

A

A unique identifier for cached objects, default is hostname + URL; can include headers, cookies, and query strings.

Already cached this exact req? y: serve from cache no: fwd to origin.

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

What is a CloudFront Cache Policy?

A

A Cache Policy tells CloudFront what makes each request unique for caching purposes—customizing this is the key to balancing performance, accuracy, and cost.

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

What are options for Cache Policy headers?

A

Use None for static content or Whitelist only for the headers that affect your content rendering; headers control caching performance.

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

What are options for Cache Policy query strings?

A

None, Whitelist, Include All-Except, or All.

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

What is an Origin Request Policy in CloudFront?

A

Defines headers, cookies, and query strings sent to origin but not used in caching.

Defines what gets forwarded to your origin when a viewer makes a request

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

What is a CloudFront Invalidation?

A

You just updated a file, like index.html, but CloudFront is still serving the old cached version. Instead of waiting for the TTL to expire, you can force CloudFront to fetch the latest version from the origin.

Forces cache refresh before TTL expires using CreateInvalidation API.

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

What is CloudFront Cache Behavior?

A

CloudFront Cache Behavior defines how CloudFront should handle requests for specific URL patterns in your distribution.

Different settings per URL path pattern, can route to different origins.

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

What are CloudFront Geo Restrictions?

A

Restrict access by country using allowlists or blocklists based on Geo-IP.

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

What are CloudFront Signed URLs and Cookies?

A

Allow restricted content delivery with custom access policy including expiration and IP filtering.

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

When to use Signed URL vs Signed Cookie?

A

Control access to private content served through CloudFront — like protecting paid content, internal files, or personalized data. They allow you to grant temporary access to content only to authorized users.

Signed URL: one file; Signed Cookie: multiple files.

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

How are Signed URLs verified?

A

CloudFront checks 3 things to validate a Signed URL.
Signature: Ensures the URL was signed with a trusted private key. Policy: Enforces expiration time, resource path, and optional IP/start time rules. Key Group: The signing key must belong to a trusted key group on the distribution

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

What is CloudFront Pricing based on?

A

Edge location region; higher costs in more expensive regions.

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

What are CloudFront Price Classes?

A

Price Classes: All, 200, and 100 reduce cost by limiting edge locations.

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

What is CloudFront Multiple Origin routing?

A

Route to different backend origins (like S3, EC2, ALB, etc.) based on path patterns like /images/*.

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

What is a CloudFront Origin Group?

A

Defines primary and secondary origins for failover.

19
Q

What is CloudFront Field-Level Encryption?

A

Encrypts sensitive fields in requests at the edge location using asymmetric encryption.

20
Q

What are CloudFront Real-Time Logs?

A

CloudFront Real-Time Logs let you stream detailed logs of every request made to your CloudFront distribution in near real time—useful for monitoring, debugging, and analytics.

Logs sent to Kinesis Data Streams with selectable fields and sample rate

21
Q

What is AWS Elastic Beanstalk?

A

A developer-centric service for deploying applications using familiar AWS components like EC2, ASG, and ELB.

22
Q

What AWS resources does Elastic Beanstalk manage?

A

EC2, ASG, ELB, RDS, scaling, load balancing, instance config, and health monitoring.

23
Q

What are the main components of Elastic Beanstalk?

A

Application, Application Version, and Environment.

24
Q

What are the Elastic Beanstalk environment tiers?

A

Web Server Environment Tier for applications that handle HTTP(S) requests directly, and Worker Environment Tier for background processing of tasks.

25
Q

Name three supported platforms in Elastic Beanstalk.

A

Java, Node.js, Python (and more like .NET, PHP, Ruby).

26
Q

What is a good Elastic Beanstalk deployment mode for development?

A

Single Instance.

27
Q

What is ‘All at once’ deployment mode?

A

Deploys all instances at once, causing downtime but fastest deployment.

28
Q

What is ‘Rolling’ deployment mode?

A

Updates a few instances at a time with no additional cost but some capacity loss.

29
Q

What is ‘Rolling with additional batches’ deployment mode?

A

Adds extra capacity temporarily to keep service available during deployment.

30
Q

What is ‘Immutable’ deployment mode?

A

Uses new instances for new version and swaps when healthy; zero downtime but high cost.

31
Q

What is Blue/Green deployment in Elastic Beanstalk?

A

Creates a new environment with the new version and swaps it in when ready.

32
Q

What is Traffic Splitting in Elastic Beanstalk?

A

Sends a percentage of traffic to a new version to test stability before full rollout.

33
Q

What CLI tool helps manage Elastic Beanstalk applications?

34
Q

Name two EB CLI commands.

A

eb deploy, eb status (others include eb create, eb logs, eb terminate).

35
Q

What format is used in .ebextensions files?

A

YAML or JSON with .config extensions.

36
Q

Where are .ebextensions placed?

A

In the root directory of the application source code.

37
Q

How many versions does Elastic Beanstalk store by default?

A

Up to 1000 application versions.

38
Q

What is a Beanstalk lifecycle policy?

A

Removes old versions based on time or space to manage application versions.

39
Q

What is Elastic Beanstalk cloning?

A

Lets you create an exact duplicate of an existing environment, including its configuration and platform settings — it’s super useful for testing, debugging, or blue/green deployments.

40
Q

What service does Elastic Beanstalk use under the hood?

A

AWS CloudFormation.

41
Q

Why should you not use RDS provisioned by Elastic Beanstalk in production?

A

Because the database lifecycle is tied to the Beanstalk environment, so if you terminate the environment, the RDS instance is deleted as well

42
Q

How do you migrate Elastic Beanstalk environments with a different ELB type?

A

Create a new environment, deploy app, and swap DNS (CNAME/Route 53).

43
Q

How do you decouple RDS from an Elastic Beanstalk environment?

A

To decouple RDS from Elastic Beanstalk, create a DB snapshot, protect it from deletion, launch a new environment without RDS, point it to the existing DB, test, swap CNAMEs, and terminate the old environment.