Architecture Diagram
User │ ▼ Route 53 (DNS) │ ▼ CloudFront (CDN) │ ▼ EC2 Instance (Express.js)
Amazon EC2 (Elastic Compute Cloud)
This web application is hosted on an Amazon EC2 instance running Amazon Linux 2. EC2 provides:
- Scalable Computing Capacity: The ability to scale up or down based on demand
- Full System Access: Complete management over the computing environment
- Flexible Configuration: Choice of instance types based on CPU, memory, storage, and networking capacity
- Integration: Seamless integration with other AWS services
This blog uses a t2.micro instance, which is included in the AWS Free Tier.
Amazon CloudFront
Content is delivered through Amazon CloudFront, a fast content delivery network (CDN) service that securely delivers data with low latency and high transfer speeds. Benefits include:
- Global Distribution: Content is served from the closest edge location to the user
- Security: Integration with AWS Shield for DDoS protection
- Programmability: Customizable with Lambda@Edge functions
- Integration: Works seamlessly with other AWS services
CloudFront significantly improves load times by caching content at edge locations worldwide.
Amazon Route 53
DNS management is handled by Amazon Route 53, a scalable and highly available domain name system (DNS) web service. Key features:
- Reliability: Built on AWS's highly available and reliable infrastructure
- Flexibility: Support for various routing policies, including latency-based and geolocation
- Health Checking: Automated DNS failover capability
- Domain Registration: Integrated domain registration service
Route 53 ensures that users are directed to the correct CloudFront distribution for content delivery.
Implementation Details
The AWS infrastructure for this Blog was provisioned using best practices:
- EC2 instance secured with a security group that only allows necessary traffic
- CloudFront distribution configured to cache static assets while allowing dynamic content
- Route 53 set up with appropriate A records and health checks
- Express.js application deployed with PM2 for process management
This architecture demonstrates a production-ready setup that offers potential for expansions with services such as AWS Elastic Beanstalk for easier deployment or Amazon RDS for database management.