1 Answer
- Newest
- Most votes
- Most comments
1
Hello,
Yes, you can create an RDS instance specifically for local development purposes, and it can help streamline the development process for your team. However, you'll need to take some security measures to ensure that the development RDS instance is not exposed to the public internet.
How you can set it up...?
Create a new RDS instance:
- In the AWS Management Console, navigate to the RDS service and create a new PostgreSQL instance. During the creation process, make sure to select the appropriate instance class, storage, and other configurations based on your development needs.
Configure the VPC:
- When creating the RDS instance, choose the option to create a new Virtual Private Cloud (VPC) or select an existing VPC. If you create a new VPC, it will be isolated from your production environment by default.
Configure the security group:
- In the security group settings for the RDS instance, you'll need to allow inbound traffic from your development team's IP addresses or a specific IP range. This will ensure that only authorized machines can connect to the development RDS instance.
Connect to the RDS instance locally:
- After the RDS instance is created, you can retrieve the endpoint (hostname) and port number from the instance details. Your development team can then connect to the RDS instance using this endpoint and the appropriate credentials.
To enhance security, you can consider the following additional measures:
Use SSL/TLS encryption:
- Enable SSL/TLS encryption for the RDS instance to ensure that all data transmitted between your local machines and the RDS instance is encrypted.
Set up a bastion host:
- Instead of allowing direct connections from your development machines to the RDS instance, you can set up a bastion host (jump box) within the same VPC. Your development team can then connect to the bastion host first, and from there, connect to the RDS instance. This adds an extra layer of security.
Implement IP whitelisting:
- If your development team's IP addresses are static or within a known range, you can whitelist only those IP addresses in the security group rules for the RDS instance.
Use temporary credentials:
- Instead of using long-lived credentials, you can generate temporary credentials with limited privileges and a short expiration time for your development team to connect to the RDS instance.
Set up a VPN:
- While not strictly necessary, setting up a VPN connection between your development machines and the VPC can provide an additional layer of security by encrypting all traffic between your local machines and the AWS resources.

Hey!
Thanks for the fast response, I have already an AWS CDK project to setup my dev environment, should I put there also the creation of this RDS instance for localhost development? Or should I do it manually since it is only for localhost and not for the dev environment. Also, if we don't have yet a VPN, could I create the RDS opened and then add the access only from the VPN specifics ips?
Yes, it's recommended to manage all infrastructure resources, including the local development RDS instance, using Infrastructure as Code (IaC) tools like AWS CDK. However, you can create a separate CDK project or stack specifically for managing the local development resources.
No, it's not recommended to create an RDS instance with a public IP address and then restrict access using security groups. Instead, place the RDS instance within a private subnet of your VPC, and restrict access to a bastion host or jump box within a public subnet.
Great!
Now I have everything clear, thanks!
keep Learning....!