Score:0

EC2 Instance connection to an RDS instance accessible only via VPN

fr flag

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?

Score:0
gp flag
Tim

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.