DEV Community

Cover image for Accessing RDS from phpadmin Container
Hamza Nasir
Hamza Nasir

Posted on

Accessing RDS from phpadmin Container

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

Postgres on Neon - Get the Free Plan

No credit card required. The database you love, on a serverless platform designed to help you build faster.

Get Postgres on Neon

Top comments (0)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay