0

I have a Laravel application (API) that I am trying to move to AWS, however, the DB sits privately in AWS and is only accessible to me through a VPN.

The database is an RDS instance.

How can I provide my EC2 instance with access to the RDS Database?

chewie
  • 105
  • 1

1 Answers1

0

You put the EC2 instance in the same AWS Account / VPC as the database.

If you don't have access to that VPC you create a new AWS account you may have to copy the database and create a new account, using a process something like this:

  • Set up new AWS account / VPC / subnets / etc
  • Set up new RDS instance
  • Use AWS Database Migration Service to copy old database to new. You can also use the database native tools, e.g. mysqldump
  • Set up EC2 in new VPC, configure application to point at new RDS

AWS is not a simple hosting environment, it's a complex enterprise environment and people really need training to understand it. A simple environment like Digital Ocean / Lightsail is better for simple needs.

Tim
  • 31,888
  • 7
  • 52
  • 78