VPC
VPC
● Create a new VPC with a CIDR block that doesn't conflict with other networks.
● Example: CIDR block could be 10.0.0.0/16.
Subnets:
● Public Subnets: For the frontend web interface and load balancer.
● Example: 10.0.1.0/24
● Private Subnets: For backend servers and databases.
● Example:10.0.2.0/24 for backend and 10.0.3.0/24 for the database.
● Use multiple Availability Zones for fault tolerance.
Internet Gateway (IGW):
● Attach an IGW to enable communication between the VPC and the internet for the
public subnets.
Route Tables:
● Public Route Table: Associated with public subnets and route traffic to the internet
gateway.
● Private Route Table: Associated with private subnets and not connected to the
internet.
Security Groups:
● Frontend Security Group: Allow HTTP/HTTPS traffic from the internet to the frontend
instances.
● Backend Security Group: Allow traffic only from the frontend instances or specific IP
ranges to the backend server instances.
● Database Security Group: Allow access only from the backend server instances.
NAT Gateway (optional):
● For private subnets to access the internet (e.g., for software updates). Associate it
with a public subnet.
Elastic Load Balancer (ELB):
● Deploy the ELB in the public subnet(s) to distribute incoming traffic among frontend
instances.
EC2 Instances:
● Frontend Instances: Host the web interface and reside in the public subnet(s).
● Backend Server Instances: Handle transactions and reside in the private subnet(s).
● Database Instance: Store user information and product inventory in the private
subnet(s).
RDS (Relational Database Service) or other Database Services:
● Utilize RDS for database needs, ensuring it's placed in the private subnet(s) for
security.
Network ACLs (NACLs):
● Optionally, configure NACLs for an added layer of security at the subnet level,
controlling inbound and outbound traffic.
● Elastic IPs (EIPs): Assign EIPs to resources that require permanent public IP addresses.
● Monitoring & Logging: Implement CloudWatch for monitoring, and CloudTrail for logging and
tracking API activity.
● Backup & Redundancy: Set up regular database backups and consider Multi-AZ deployment
for increased database redundancy.
● Encryption: Use encryption for sensitive data at rest and in transit (e.g., SSL/TLS for
communication, AWS Key Management Service for encryption keys).
● Scaling: Consider auto-scaling mechanisms to handle fluctuating traffic loads.