Hamza Nasir
Posted on August 30, 2024
I Built an AWS LAB to access RDS from phpadmin container.
Here's a breakdown of my recent AWS project:
š©š£š š¦š²ššš½: I configured a VPC with two Availability Zones to enhance fault tolerance. Within each zone, I created both public and private subnets, even though initially only one zone was required. This decision was made with future scalability in mind.
š„šš¦ šš²š½š¹š¼ššŗš²š»š:MySQL RDS instance was created and placed in the private subnet of Zone 1 to isolate the database from public internet access.
ššš¦ š¦š²šæšš¶š°š² ššæš²š®šš¶š¼š»: Given the free tier benefits, I opted for an EC2 launch type for my ECS service and attaching with the public subnet of same AZ where the database is placed.
š£šš£šš±šŗš¶š» šš¼š»šš®š¶š»š²šæ š§š®ššø: I defined a task for a PHPAdmin container, specifying parameters such as CPU, memory, port mappings, and the Docker image. This task was then run on the ECS machines.
š¦š²š°ššæš¶šš ššæš¼šš½ šš¼š»š³š¶š“ššæš®šš¶š¼š»: I adjusted the VPC security group to permit traffic from the ECS to enable communication. ECS machine's security group was configured to accept incoming connections from my local machine.
š¢ššš°š¼šŗš²: Successful implementation of the above steps allowed me to access my RDS instance's dashboard through the PHPAdmin container
Posted on August 30, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.