Where can we cache in our AWS applications?
EXTERNAL: We can cache data that’s going to be returned to our
users (e.g., images, videos, and static content)
INTERNAL: Caching is an important tool we can use to speed up our databases. The less we talk to the database, the better.
What are Caching Solutions in AWS?
What Is CloudFront?
CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally. It helps reduce latency and provide higher transfer speeds using AWS edge
locations.
Supports only public SSL certificated not self-signed.
CloudFront Settings
4 CloudFront facts
What Is ElastiCache?
ElastiCache is a managed version of 2 open-source technologies: Memcached and Redis.
Neither of these tools is specific to AWS, but by using ElastiCache you avoid a lot of common issues you might encounter.
It can front just about any database, but really excels being placed in front of RDS.
Memcached vs. Redis
Memcached:
* Simple database caching solution. Simple data structures(string)
* Not a database by itself
* No failover or Multi-AZ support
* No backups
* multithreaded by design
Redis:
* Supported as a caching solution. Advanced data structures(i.e. sorted sets)
* Functions as a standalone database
* Failover and Multi-AZ support
* Supports backups
* transactions
DynamoDB Accelerator (DAX)
specific to DynamoDB
What Is Global Accelerator?
Global Accelerator is a networking service that sends your users’ traffic through AWS’s global network infrastructure. It can increase
performance and help deal with IP caching(uses 2 anycast ips).
What is CloudFront behavior?
What is the purpose of implementing Viewer Access Restriction in AWS CloudFront?
“CloudFront behavior”
Describe caching in Amazon CloudFront.
What is cache invalidation in Cloudfront?
Cache invalidation removes outdated content from CloudFront edge locations, ensuring users receive the latest version. It can be done using paths or an invalidation batch file. Costs are incurred for each invalidation request. Utilize versioned file names if possible to avoid unnecessary invalidations.
What is Origin Protocol Policy in CloudFront?
The Origin Protocol Policy specifies the protocol that CloudFront uses to connect to your origin server. There are three possible values for the Origin Protocol Policy:
HTTPS only is the most secure option, but it requires your origin server to support HTTPS. If your origin server does not support HTTPS, you must use HTTP only or Match viewer.
Match viewer is the most flexible option, but it can introduce a slight performance penalty. If you are concerned about performance, you should use HTTPS only or HTTP only.
How can you Restrict Access to S3 Origins in CloudFront?
Overrides Custom headers by default. But can be configured differently.
CloudFront origin access identity (OAI) provides similar functionality as origin access control (OAC), but it doesn’t work for all scenarios. This is why we recommend using OAC instead. Specifically, OAI doesn’t support:
Amazon S3 buckets in all AWS Regions, including opt-in Regions
Amazon S3 server-side encryption with AWS KMS (SSE-KMS)
Dynamic requests (PUT, POST, or DELETE) to Amazon S3
New AWS Regions launched after December 2022
How can you Restrict Access to Custom Origins in CloudFront?
What is the difference between public and private behaviors in CloudFront?
Where are Trusted Signers and Trusted Key Groups used in CloudFront?
What is the difference between Signed URLs and Signed Cookies in CloudFront?
What is Lambda@Edge?
Lambda@Edge is a feature of Amazon Web Services (AWS) that allows you to run serverless functions at the edge locations of the AWS CloudFront content delivery network. These functions can be used to customize and enhance the content delivery, security, and user experience of your web applications.
What are some common ways to use Lambda@Edge in CloudFront?
Can CloudFront cache dynamic content?
Amazon CloudFront primarily caches and serves static content but can cache dynamic content selectively through custom cache behaviors, Lambda@Edge functions, and custom headers configuration.