Website Performance Optimization with Amazon CloudFront

Explore how Romexsoft provided website performance optimization for HealthTech SaaS with Amazon CloudFront.

  • Application Modernization
  • HealthTech
  • UK
Website Performance Optimization with Amazon CloudFront

Our Customer

Healthcare Web App

Healthera operates a leading UK healthcare marketplace that provides patients with medicines, healthcare services and products through the largest digital platform of pharmacies and GPs, including national chains and independent providers.

The Challenge

Web Performance and Latency Optimization

Healthera has engaged with a leading European network of independent pharmacists with over 1,000 member pharmacies across the UK and stores in 9 European countries. The pharmacy network wanted to utilize Healthera’s API and build their web application using React.js/Next.js frameworks on top of it.

Moreover, the DNS configuration of the client network’s domain was managed outside of AWS, while the web application had to be launched in Healthera’s AWS account. Romexsoft had to make sure the external DNS worked smoothly with AWS services so the website could be reached securely, with valid certificates and no downtime.

So Healthera as our client asked us to assist with this project from the AWS infrastructure and deployment perspectives. Here are the actual challenges we were tasked with addressing:

  • Improving the app performance by reducing latency to optimizing load times for users and prevent poor system performance under load;
  • Developing a CI/CD pipeline that deploys a React.js SPA to make releases frequent and reliable (single-page application);
  • Ensuring the app’s scalability and optimal performance to handle expected traffic growth;
  • Reducing application infrastructure costs to lower data transfer expenses and overall TCO (e.g. data transfer expenses).

The Solution

Website Performance Optimization Solution with Cloudfront and DevOps

Accelerating Content Delivery

We solved the problem of improving the performance of the client’s website and partners’ applications using Amazon CloudFront. CloudFront CDN helped us speed up static content such as images, animations, CSS, JavaScript, and the ReactJS apps to end users worldwide.

We configured a CloudFront distribution with a source to an S3 bucket with a website. Additionally, the ability to integrate CloudFront with Lambda@Edge allowed us to rewrite client requests and add the .html suffix, which is necessary for proper processing on the Next.js side.

With the new integration, the client expects a surge in traffic and we advised increasing the amount of running tasks in the ECS cluster responsible for processing requests to the api.healthera.co.uk endpoint.

For the pharmacy network host we recommended creating a CNAME record and directing it to the CloudFront distribution. In order to efficiently route traffic to the root domain through CloudFront, we suggested setting up AWS Global Accelerator (GA) and creating two A records to IPs provided by it. Additionally, we configured Global Accelerator (GA) to direct traffic to the existing AWS ALB (Application Load Balancer) where a new listener rule was established, enabling a 301 redirect to the root domain for URLs without the “www” prefix.

Dedicated CI/CD Pipeline for SPA

The client decided to sell a ready-to-use version of their web application as a SaaS solution, which needed the capacity of the rapid delivery at scale, targeting the onboarding of 10 or 15 new clients every day. It was imperative that the onboarding process required minimal involvement of non-tech skilled clients while also keeping infrastructure costs low.

What we did was create a CI/CD pipeline that deploys a React single-page application (SPA) to static S3 hosting. The deployment pipeline we implemented using Jenkins as this is the main build tool for Healthera’s workloads.

Infrastructure Cost Optimization

Using CloudFront with S3 bucket proved to be a cost-effective solution by minimizing data transfer expenses. It was achieved through caching frequently used content in edge locations, consequently reducing the volume of requests directed to the S3 bucket. As a result, data transfer costs were reduced, and application performance improved by reducing latency and load times for users located far from the S3 bucket.

Web Performance Optimization with Amazon CloudFront – Architecture Diagram

Web performance optimization

The role of Amazon CloudFront in the project

Leveraging Amazon CloudFront:

  • Enhances app availability by caching content in edge locations which reduces server workload
  • Enables quick content delivery through the usage of HTTP or HTTPS protocols
  • Facilitates GEO targeting service for content delivery to specific end-users
  • Provides high security with the ‘Content Privacy’ feature
  • Sustains cost-efficiency as it only charges for the data transfer
  • Ensures significant productivity gains because the service is easy to use.
Amazon Web Services utilized
Amazon Simple Storage Service icon
Simple Storage Service (S3)
CodePipeline icon
CodePipeline
Amazon CloudFront icon
CloudFront
AWS Global Accelerator icon
Global Accelerator
Elastic Load Balancing
Elastic Load Balancing
AWS Certificate Manager icon
Certificate Manager (ACM)

Verified by AWS

This case study is validated by AWS. Experts and professional auditors from AWS reviewed this case study and verified that we, Romexsoft, have built a functional infrastructure and efficient cloud solution.

It showcases the value that Romexsoft, being a certified AWS Advanced Tier Services Partner, delivers cloud solutions according to AWS standards and best practices.

Check out Romexsoft’s profile at AWS Partner Network.

THE RESULTS

Faster Load Times and Improved User Experience

Improved User Experience and Customer Satisfaction

What was made during the project led to significantly faster loading times of the application and its better responsiveness, so the app became notably more user-friendly.

Organically Increased Customer Base

Consequently, the above mentioned improvements have propelled the client’s platforms up in SEO rankings, attracting more organic traffic and, in turn, a larger customer base.

Technical Scalability for Future Growth

Expected traffic increase as well as further enhancing of solutions’ users needs in flexible and controllable extending of the computing capacity of the application. So we thought out and ensured this ability in advance.

Reduced Expenses for the IT Infrastructure

Since the client provides the web application as a SaaS solution, the usage of Amazon CloudFront with Amazon S3 instead of ECS resulted in significant cost efficiency, which in turn ensures lower prices for SaaS clients.

Why Romexsoft

AWS CloudFront Optimization Vendor

Romexsoft is an AWS Managed and DevOps Services Provider with proven experience in optimizing SaaS and HealthTech applications. We design, implement cloud architectures that enhance web performance, streamline deployment, and ensure fast, secure, and reliable content delivery for global users, while also improving and optimizing these capabilities in existing applications.

Our expertise delivers measurable improvements in applications’ efficiency and user experience:

  • Up to 3× faster website content loading with Amazon CloudFront
  • Reduced infrastructure and data transfer costs through AWS edge caching
  • Automated CI/CD pipeline enabling rapid onboarding for multiple SaaS clients per day
  • Build secure web infrastructure with AWS WAF.

Frequently Asked Questions

How can you reduce the execution costs of Lambda@Edge functions when using Amazon CloudFront?

You can reduce Lambda@Edge execution costs by choosing the right runtime and configuration. The cost depends on three main factors: the number of function calls, their execution time, and memory usage. The runtime you select directly affects these parameters. Interpreted languages are usually more cost-efficient for small, lightweight functions since they start quickly and run short tasks faster. Compiled languages work better for compute-heavy workloads or when using Provisioned Concurrency, where initialization happens in advance and doesn’t add latency during execution.

Do I need to change my entire infrastructure to use Amazon CloudFront?

No, you don’t need to rebuild your infrastructure. Amazon CloudFront works as a CDN layer in front of your existing setup. You simply point your DNS to the CloudFront distribution and connect it to your current origin, such as S3, ALB, or EC2. Some minor adjustments, like cache headers or HTTPS configuration, may be needed, but no major architectural changes are required. If you’re unsure how to set it up, ask an AWS CloudFront expert to implement it correctly.

Can CloudFront help reduce data transfer costs for a SaaS or healthcare web application?

Yes. CloudFront lowers data transfer costs by caching content in edge locations close to users, which reduces the number of direct requests sent to your origin, such as S3 or EC2. This not only decreases outbound data transfer from AWS regions but also improves load times and overall application performance for SaaS and healthcare users.

How does AWS WAF enhance security without slowing down content delivery through CloudFront?

AWS WAF improves security without reducing content delivery by filtering harmful traffic at CloudFront's edge sites. It blocks threats like SQL injection or cross-site scripting before requests reach the origin, keeping latency low since inspection happens close to users. This ensures strong protection and consistent performance at the same time.

Related Success Stories

Discover how we designed and implemented a connectivity solution between HSCN and our client’s platform.
  • Application Modernization
  • HealthTech
  • UK
Uncover how we managed to improve website performance and security using AWS WAF and Amazon CloudFront.
  • Application Modernization
  • E-Commerce
  • Ukraine

Craft Your Vision – Make the First Step.
Book a Consultation With Our Experts

    Contact Romexsoft
    Get in touch with AWS certified experts!