Deploying Three Tier Architecture Using AWS Services
Deploying Three Tier Architecture Using AWS Services
Deploying Three Tier Architecture Using AWS Services
AWS Services
About this project:
Throughout the workshop, you'll focus on ensuring availability (the system is
operational and accessible) and scalability (the system can handle increased loads) by
implementing best practices like load balancing, auto-scaling, and security
configurations. By the end of the project, you will have built and deployed a resilient
and scalable web architecture in AWS, gaining practical knowledge in networking,
security, and cloud infrastructure management.
AWS Services used:
1. EC2 (Elastic Compute Cloud)
Use: Provides scalable virtual servers to run applications in the cloud. You can
launch instances with different operating systems, storage, and networking
capacities, which can be easily scaled up or down.
2. ASG (Auto Scaling Group)
Use: Automatically adjusts the number of EC2 instances to meet demand,
maintaining availability and scaling the instances up or down based on traffic
or performance requirements.
3. ALB (Application Load Balancer)
Use: Distributes incoming traffic to multiple targets (e.g., EC2 instances,
containers, Lambda functions) based on application-layer (HTTP/HTTPS)
protocols. Ideal for microservices and containerized applications.
4. IAM (Identity and Access Management)
Use: Provides secure control over access to AWS services and resources.
Enables you to create and manage users, groups, and permissions for secure
access to AWS resources.
5. S3 (Simple Storage Service)
Use: Object storage service that offers highly durable, scalable, and low-
latency storage for data, such as backups, archives, and big data analytics. Data
can be accessed from anywhere and is stored in buckets.
6. EFS (Elastic File System)
Use: Provides scalable file storage that can be mounted across multiple EC2
instances. It is fully managed and grows automatically as files are added.
7. RDS (Relational Database Service)
Use: Manages relational databases (like MySQL, PostgreSQL, MariaDB, Oracle,
and SQL Server) in the cloud. It automates backups, patching, and scaling
while maintaining high availability.
8. VPC (Virtual Private Cloud)
Use: Provides a logically isolated section of the AWS cloud where you can
launch AWS resources in a virtual network that you define, offering full control
over networking and security.
9. CloudWatch
Use: Monitors AWS resources and applications, providing real-time data, logs,
and alarms to track metrics, analyze logs, and detect anomalies in cloud
infrastructure.
10. SNS (Simple Notification Service)
Use: Fully managed messaging service for sending notifications to different
platforms (email, SMS, mobile push notifications) or triggering automated
workflows through AWS Lambda or SQS.
11. CloudTrail
Use: Provides logging, monitoring, and retention of AWS account activity
across the AWS infrastructure. Helps with governance, compliance, and
operational or risk auditing of AWS accounts.
12. Route 53
Use: Scalable domain name system (DNS) web service that provides reliable
and cost-effective domain name registration, DNS routing, and health checking
of resources.
13. CloudFront
Use: Content delivery network (CDN) service that speeds up the distribution
of static and dynamic web content, like HTML, CSS, JavaScript, and media files,
by caching them in global edge locations.
14. WAF (Web Application Firewall)
Use: Protects web applications from common web threats, such as SQL
injection and cross-site scripting (XSS). It monitors and controls incoming and
outgoing HTTP(S) requests.
15. Shield
Use: Managed Distributed Denial of Service (DDoS) protection service. It
provides safeguards against DDoS attacks for applications running on AWS,
with different levels of protection.
Architecture:
In this architecture, a public-facing Application Load Balancer forwards client traffic to
our web tier EC2 instances. The web tier is running Nginx webservers that are
configured to serve a React.js website and redirects our API calls to the application
tier’s internal facing load balancer. The internal facing load balancer then forwards that
traffic to the application tier, which is written in Node.js. The application tier
manipulates data in an Aurora MySQL multi-AZ database and returns it to our web tier.
Load balancing, health checks and autoscaling groups are created at each layer to
maintain the availability of this architecture.
Presentation tier: Component that the user directly interacts with (for example,
webpages and mobile app UIs).
Logic tier: Code required to translate user actions to application functionality (for
example, CRUD database operations and data processing).
Data tier: Storage media (for example, databases, object stores, caches and file
systems) that hold the data relevant to the application.
1. Network Layer: Setting up Virtual Private Cloud (VPC), subnets, and security groups
to ensure secure communication between different parts of the application.
2. Application Layer: Deploying the application servers, likely using EC2 instances or
AWS services like Elastic Beanstalk, to handle the core business logic.
3. Database Layer: Configuring a scalable and highly available database using services
like Amazon RDS or DynamoDB.
----------------------------------------------------------------------------------------------------------------
DESCRIPTION:
This 3-tier infrastructure is built within an AWS VPC, featuring separate tiers for the
web, application, and database layers. Traffic flows from users through Route 53 to
CloudFront, then to an external Application Load Balancer (ALB). The web tier consists
of EC2 web servers in public subnets, auto-scaled for availability. The internal ALB
directs requests to the app servers in private subnets, located in the application tier.
App servers interact with an Aurora MySQL database, utilizing multi-AZ deployment for
fault tolerance. Monitoring is done via CloudWatch, while security logs are stored in S3
buckets. NAT Gateways ensure secure internet access.