Accessing RDS from phpadmin Container

Hamza Nasir - Aug 30 - - Dev Community

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

. . . . .
Terabox Video Player