Building a Scalable E-Commerce Platform on AWS
My graduation project journey: designing and deploying a fully functional, multi-tier e-commerce website leveraging a suite of AWS services for scalability, security, and cost-efficiency.
Project Overview
As a graduating student, I embarked on an exciting challenge: designing and deploying a fully functional e-commerce website on AWS. This project has been a rewarding learning experience, architecting the platform by integrating a range of AWS services across multiple layers—frontend, backend, and analytics. Deployed in the us-east-2 (Ohio) region with availability zones us-east-2a and us-east-2b, I prioritized scalability and security while leveraging free-tier options to keep costs manageable; a decision I’m particularly proud of. This page details the architecture, deployment process, and key components I developed.
Key Information
Core Technologies Utilized
Network Layer: VPC and Subnets

The foundation of the e-commerce platform is my custom Virtual Private Cloud (VPC) named ecommerce-vpc
, configured with a CIDR block of 10.0.0.0/16
. This VPC is meticulously organized across two availability zones (us-east-2a and us-east-2b) to ensure high availability and a secure network design.
- Public Subnets: These (
10.0.1.0/24
in us-east-2a and10.0.2.0/24
in us-east-2b) host the Application Load Balancer (ALB), serving as the entry point for public traffic. An Internet Gateway is attached to the VPC, enabling communication between resources in these public subnets and the internet. - Private Subnets: These (
10.0.10.0/24
in us-east-2a and10.0.11.0/24
in us-east-2b) house the core backend infrastructure, including Amazon EKS nodes, RDS database instances, ElastiCache for Redis, and OpenSearch clusters. - Connectivity & Cost Savings: Private route tables are configured to use VPC Endpoints for internal traffic between resources in the private subnets and other AWS services (like S3, DynamoDB, ECR). This approach enhances security by keeping traffic within the AWS network and offers a cost-saving advantage by avoiding the need for NAT gateways for these services.
Security Layer: Security Groups
Security was a top priority throughout this project. I meticulously crafted Security Groups (SGs) to act as virtual firewalls, controlling inbound and outbound traffic at the instance level for different components of the platform. The following table outlines the key security groups and their primary ingress rules:
Security Group | Primary Purpose | Inbound Rules | Source |
---|---|---|---|
ALB SG | Application Load Balancer | HTTPS (TCP/443), HTTP (TCP/80) | 0.0.0.0/0 (Anywhere) |
EKS Nodes SG | EKS Worker Nodes |
|
|
Database SG | RDS, ElastiCache, OpenSearch |
|
EKS Nodes SG |
VPC Endpoints SG | VPC Interface Endpoints | HTTPS (TCP/443) | EKS Nodes SG |
This table summarizes the main ingress rules. Outbound rules are generally permissive (allow all) within the VPC or restricted as needed.
Frontend Architecture: User Interface and Delivery

For the frontend, I opted for a modern JavaScript framework (React.js or Vue.js) to build a responsive and dynamic user interface. The static assets generated by the frontend build process (HTML, CSS, JavaScript bundles, and images) are hosted in an Amazon S3 bucket configured for static website hosting.
To ensure fast global delivery and low latency for users worldwide, Amazon CloudFront is utilized as the Content Delivery Network (CDN). CloudFront caches the static content at edge locations closer to the users, significantly improving load times.
The platform's domain name is managed by Amazon Route 53, which handles DNS resolution. Security for the frontend is further enhanced by:
- Utilizing an SSL/TLS certificate from AWS Certificate Manager (ACM) provisioned to the CloudFront distribution, ensuring all traffic is served over HTTPS.
- Implementing AWS Web Application Firewall (WAF) with CloudFront to protect against common web exploits and provide an additional layer of security against malicious traffic. This setup was a significant achievement in ensuring a secure and performant user experience.
Backend Architecture: The Engine of the Platform

The backend, serving as the core engine of the e-commerce platform, is architected using a robust and scalable microservices pattern. This distributed system runs on an Amazon Elastic Kubernetes Service (EKS) cluster, strategically deployed within the private subnets of the VPC to ensure enhanced security and network isolation.
The Kubernetes worker nodes are managed by an EKS node group, utilizing t3.medium
instances for production-grade performance, with the flexibility to use t3.micro
instances for testing and cost optimization during development phases. Each microservice is individually containerized using Docker, which promotes consistency across different environments and significantly simplifies the deployment lifecycle.
Key Microservices
The platform's functionality is decomposed into the following key microservices, each responsible for a distinct domain:
Product Service
Manages the product catalog; utilizes Amazon DynamoDB for flexible and scalable NoSQL storage.
Inventory Service
Tracks product inventory in real-time; also leverages DynamoDB.
Cart Service
Stores temporary shopping cart data; uses Amazon ElastiCache for Redis for high-performance in-memory caching.
Order Service
Handles order processing and transactions; persists data in Amazon Aurora PostgreSQL.
User/Auth Service
Manages user accounts and authentication, potentially integrated with Amazon Cognito; stores user data in Aurora PostgreSQL.
Payment Service
Integrates with external payment gateways like Stripe to securely process payments.
Notification Service
Sends user notifications (e.g., order confirmations, shipping updates) using Amazon SNS and SQS for reliable, asynchronous messaging.
Search Service
Enhances product search and discovery capabilities, built upon Amazon OpenSearch Service.
To maintain secure and private communication within the AWS ecosystem, VPC Endpoints are configured for essential services such as S3, DynamoDB, and Amazon ECR (Elastic Container Registry), which hosts the Docker images for the microservices. This critical setup ensures that traffic between the EKS cluster and these AWS services does not traverse the public internet, adhering to security best practices.
Logging and monitoring were explored using Amazon CloudWatch, providing capabilities for tracking application performance, collecting metrics, and centralizing logs for operational insights and troubleshooting.
Database and Cache Tier: The Data Backbone

A robust and well-structured data persistence layer is critical for any e-commerce platform. For this project, I designed a multi-faceted data tier using various AWS database and caching services, each chosen to best suit the specific needs of different microservices:
- Amazon DynamoDB: A key-value and document NoSQL database service, DynamoDB was selected for storing the Product Catalog (
Product Service
) and real-time stock levels (Inventory Service
). Its schema flexibility, single-digit millisecond latency, and seamless scalability make it ideal for these use cases, withproduct_id
often serving as the partition key. - Amazon Aurora PostgreSQL: For transactional data requiring relational integrity, such as user accounts (
User/Auth Service
), customer orders (Order Service
), order items, and payment records, Amazon Aurora (PostgreSQL-compatible edition) was employed. Aurora provides the performance and availability of commercial databases at a fraction of the cost, along with features like automated backups and failover. - Amazon ElastiCache for Redis: To provide a high-performance, in-memory caching solution for frequently accessed or temporary data, such as shopping carts (
Cart Service
), Amazon ElastiCache for Redis was integrated. This significantly reduces latency for cart operations and offloads the primary databases. - Amazon OpenSearch Service: To power advanced product search capabilities, including faceted search and efficient indexing of product data, Amazon OpenSearch Service (successor to Amazon Elasticsearch Service) was chosen for the
Search Service
.
Analytics Layer: A Bonus Exploration

To further enhance the platform's capabilities and demonstrate a more comprehensive data strategy, I incorporated an optional analytics pipeline. This layer focuses on extracting insights from the e-commerce data, enabling business intelligence and potentially driving data-informed decisions.
The key components of this analytics exploration include:
- S3 Data Lake: Raw operational and interaction data from various sources can be collected and stored in an Amazon S3-based data lake, providing a durable and scalable repository for analytics.
- AWS Glue: This fully managed extract, transform, and load (ETL) service is used to prepare and process the data stored in the S3 data lake. Glue crawlers can discover data schemas, and ETL jobs can transform the data into a query-friendly format.
- Amazon Athena: An interactive query service that makes it easy to analyze data directly in Amazon S3 using standard SQL. Athena allows for ad-hoc querying of the processed data without needing to manage complex data warehousing infrastructure.
- Amazon QuickSight: A scalable, serverless, embeddable, machine learning-powered business intelligence (BI) service built for the cloud. QuickSight can be used to create and publish interactive dashboards from the data analyzed by Athena, providing visual insights into sales trends, customer behavior, and operational metrics.
- Amazon SageMaker: For more advanced analytics, such as building machine learning models for product recommendations or customer segmentation, Amazon SageMaker offers a comprehensive platform to build, train, and deploy ML models at scale.
CI/CD and Deployment: Automation Triumph
A cornerstone of modern software development and a key achievement in this project was establishing a robust Continuous Integration and Continuous Deployment (CI/CD) pipeline. This pipeline streamlined the development workflow, ensuring that code changes are automatically built, tested, and deployed to the AWS environment, significantly improving efficiency and reliability.
The CI/CD process was orchestrated using the following components:
- GitHub: Served as the central code repository. All codebase for the frontend, backend microservices, and infrastructure configurations were version-controlled here. Commits pushed to specific branches (e.g., main or develop) automatically triggered the CI/CD pipeline.
- AWS Elastic Container Registry (ECR): Used as a fully-managed Docker container registry to store, manage, and deploy the Docker images for each of the e-commerce platform's microservices. The pipeline would build new Docker images upon code changes and push them to ECR.
- GitHub Actions (Implied): While not explicitly named in the "CI/CD and Deployment" section of the blog, GitHub Actions is mentioned as the CI/CD tool in the "Core Technologies Utilized" section of `ecommerce.html` and is a common choice for automating workflows from GitHub. It would be responsible for running build scripts, containerizing applications, pushing to ECR, and initiating deployments to Amazon EKS.
- AWS Secrets Manager: To securely manage sensitive information such as API keys, database credentials, and other secrets required by the applications, AWS Secrets Manager was integrated. This avoids hardcoding sensitive data and allows for controlled access and rotation of secrets.
- Custom IAM Roles and Policies: Granular AWS Identity and Access Management (IAM) policies and roles (such as
EKSClusterRole
andEKSNodeRole
) were defined to ensure that each component of the platform (EKS, RDS, ECR, etc.) had only the necessary permissions required to function (Principle of Least Privilege).
This automated pipeline significantly reduced manual intervention, minimized the risk of human error during deployments, and enabled faster iteration cycles, which was a personal triumph in applying DevOps best practices to a complex cloud application.
Global Infrastructure: Thinking Big
While the primary deployment region for this project was us-east-2 (Ohio), a forward-thinking approach to resilience and availability was considered in the architecture. The design accommodates a multi-region strategy, with us-east-1 (N. Virginia) planned as a secondary region for disaster recovery purposes.
This involves ensuring that data can be replicated across regions and that services can be failed over if the primary region experiences an outage. Leveraging AWS's global infrastructure, the platform is designed to maintain high availability across different Availability Zones (AZs) within the primary region, and can be extended for cross-region disaster recovery, a crucial aspect for enterprise-grade applications. Planning for such scalability and resilience was an enjoyable part of the architectural process.
Project Conclusion and Key Learnings
This graduation project successfully demonstrated the design and deployment of a professional, scalable e-commerce solution on AWS, balancing cost-efficiency with industry-standard practices. From the S3/CloudFront-hosted frontend and the microservices architecture on Amazon EKS, to the well-organized database and cache tiers, each layer was a significant learning step in cloud engineering and application development.
The journey reinforced the importance of robust CI/CD pipelines, meticulous security configurations, and the power of AWS services in building resilient and scalable applications. The hands-on experience with Kubernetes orchestration, microservice decomposition, and various data storage solutions has been invaluable.
I hope this overview of the e-commerce platform architecture and my development process provides useful insights. This project not only served as a comprehensive academic endeavor but also as a practical application of skills relevant to modern cloud and DevOps roles.
"The advance of technology is based on making it fit in so that you don't really even notice it, so it's part of everyday life."