This content originally appeared on DEV Community and was authored by Hamza Nasir
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
This content originally appeared on DEV Community and was authored by Hamza Nasir
Hamza Nasir | Sciencx (2024-08-30T15:03:49+00:00) Accessing RDS from phpadmin Container. Retrieved from https://www.scien.cx/2024/08/30/accessing-rds-from-phpadmin-container/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.