TODAY’s AGENDA: “AWS CloudFront”

Kübra Kuş
TurkNet Technology
Published in
6 min readJun 4, 2024

Originally published at http://kubikolog.com on June 4, 2024.
You can visit the original for the Turkish version.

Greetings to everyone as we enter the hot summer days of early June. Today, I want to share with you an article I prepared based on the AWS CloudFront Workshop we recently attended. If you have your tea ready, let’s begin 🐸.

Nowadays, it is increasingly important for websites and applications to be accessible quickly and reliably. Internet users want to access content within seconds, which can be a big challenge for web developers. This is where services like AWS CloudFront come into play, designed to overcome this challenge.

AWS CloudFront is a CDN (Content Delivery Network) service offered by Amazon Web Services.

What is a CDN?

A CDN (Content Delivery Network) uses geographically different servers to deliver web content to users in the fastest way possible, with the least network and processing latency.

Many websites, such as e-commerce and news sites, leverage CDNs to keep page load times to a minimum. A CDN typically delivers HTML, JavaScript, CSS, images, video, and font files that do not change frequently among users. These contents are provided by the origin server and cached by the CDN for a certain period. After this period, user requests are served from this cache. Once the cache duration expires, the CDN refers back to the origin server to refresh the resources.

CDN providers minimize network latencies by hosting servers in various countries worldwide. Additionally, these distributed servers prevent the website’s data center from experiencing congestion.

AWS CloudFront distributes web content quickly and securely to users through the Edge Location closest to the clients. This means when you access a website or use an application, the content is quickly delivered to you via CloudFront’s global network.

One of the best aspects of this service is the data transfer speeds. With CloudFront, web content is accessed faster, and web applications respond more quickly. Also, distributing web content using this service reduces server load and provides higher scalability at a lower cost. This way, users have a better experience while businesses operate more efficiently.

Another great feature is that CloudFront can integrate with other AWS services. For instance, a website hosted on Amazon S3 can easily be distributed via CloudFront. Additionally, other services like AWS Lambda can also be used with CloudFront, providing more flexibility to developers.

In conclusion, AWS CloudFront is an excellent CDN service that ensures web content is delivered quickly, securely, and scalably. This service, which greatly assists developers, improves user experience while offering better performance and cost-efficiency to businesses.

CloudFront Terminology

  • Edge Locations: These are locations where content is cached and can also be written.
  • Origin: This is the source of all the files that the CDN will distribute. Origins can be an S3 Bucket, EC2 Cloud Server, Elastic Load Balancer, or Route53.
  • Distribution: This is the name given to the CDN that consists of a collection of Edge Locations.
  • Amazon S3 Transfer Acceleration: Provides fast, easy, and secure file transfers over long distances between your end users and an S3 bucket. Transfer Acceleration leverages Amazon CloudFront’s globally distributed edge locations. Once data arrives at an edge location, it is routed to Amazon S3 over an optimized network path.

Lambda@Edge

Lambda@Edge is a feature of AWS Lambda that allows you to create functions that run on CloudFront Edge Locations. This enables you to run code close to the CDN’s Edge Locations.

Lambda@Edge can be used in various scenarios such as generating dynamic content, performing security checks, and managing cache. For example, functions such as serving customized content to clients, implementing firewall controls, and compressing content on-demand can be executed using Lambda@Edge.

This feature provides functionality on each Edge Location of CloudFront’s global network, ensuring content is delivered faster and from closer sources. Lambda@Edge leverages all the features of AWS Lambda while running functions on Edge Locations, enabling powerful and scalable functionality.

In summary, Lambda@Edge allows creating functions that run on CloudFront’s Edge Locations using AWS Lambda, making content delivery faster, more secure, and more customizable.

AWS Shield

AWS Shield is a DDoS (Distributed Denial of Service) protection service offered by AWS. DDoS attacks can pose a serious threat to businesses by sending a large amount of traffic to a service, blocking normal traffic, or rendering the service unusable. AWS Shield provides protection against such attacks, helping businesses protect their applications and infrastructure securely.

AWS Shield is offered in two different versions:

  • AWS Shield Standard: A free service automatically available to AWS customers, providing basic DDoS protection. It blocks the most common and simple DDoS attacks directed at the AWS infrastructure. This is automatically included in an AWS account and does not incur additional fees.
  • AWS Shield Advanced: A paid service providing advanced DDoS protection to AWS customers. This service offers protection against more comprehensive and complex DDoS attacks. AWS Shield Advanced monitors attacks in real-time, has automatic attack mitigation features, and provides expert support. Additionally, it can be integrated with other security features like AWS Web Application Firewall (WAF).

AWS Shield provides an important security layer for both websites and applications. It offers convenience and security to protect against DDoS attacks, allowing businesses to operate seamlessly.

Redis vs CloudFront

Redis and CloudFront are different services designed for different needs and usage scenarios.

  • Redis: Redis is an open-source database used for in-memory data storage and cache management. It is particularly used for caching dynamic content and ensuring fast access. For example, Redis can be preferred for caching frequently accessed products on an e-commerce website. This ensures fast loading of product pages and enhances site performance. Redis’s memory-based data storage structure offers high performance and low latency.
  • CloudFront: CloudFront is a content delivery network used for distributing static and dynamic content. This service improves user experience by distributing content quickly and securely over a global network. It is particularly used for faster loading of static content (e.g., images, CSS files). CloudFront distributes content through edge locations closest to users, offering high speed and low latency. Thus, websites and applications respond faster, providing a better experience for users.

In summary, Redis and CloudFront are different services used for different purposes. Redis is an open-source database used for in-memory data storage and cache management. CloudFront is a content delivery network used for distributing static and dynamic content.

As we come to the end of the article, we stick to the tradition and present one of KubikFM’s favorite songs to you, friends 🐸.

Additionally, I want to close the day with a small venue recommendation. Since my university years, I have been fond of following a venue that has a wish tree for sale, but the price is jaw-dropping (by the way, your wishes do not come true, it was tested…… ), a workshop in the daytime, and a tea-loving venue with concerts in the evening: TAHTASI EKSİKLER: ATÖLYE KAFASI. Recently, they also started having breakfast concerts. So, go, I think 😇.

Those who have already discovered the place probably understood the connection with the song, so I leave you alone with Küçük Yılan 🐸.

You can visit the original for the Turkish version.
Originally published at
http://kubikolog.com on June 4, 2024.

--

--