rashid hacker
rashid hacker

Reputation: 125

AWS EC2 Connect Database from another server

in my region, AWS doesn't have small databases just large, so I want to connect my EC2 node project to MySQL from another server like

BlueHost MySQL, etc

both of Ec2 and databases services in one region

it's just that the available size of AWS databases in my region, So Large and I don't even need a Quarter of these databases

is it possible?

Upvotes: 0

Views: 915

Answers (1)

Chris Williams
Chris Williams

Reputation: 35188

Here is a detail of the various options that you have, based on your scenario you are trying to rehost your database from its current host to another.

As you're using MySQL you can make use of the managed RDS service, Aurora MySQL or an EC2 host either within the same region or a different region.

If the VPC is different (this would be the case in a different region) you can establish a peering connection between the VPC. You will need to make sure that the security groups allow inbound access from the source of the other VPCs CIDR. You should also ideally keep the database as a private instance to avoid any malicious public ingress.

If the database is instead migrated to either another cloud or on-premise you would need to establish a connection between the 2 networks. AWS provides VPN solutions for both site to site VPN and client VPN so this is worth exploring. Additionally there are third party VPN solutions on the AWS marketplace such as OpenVPN.

Finally ensure you are aware that there will be an increased latency between regions, for an overview of this latency take a look at Cloudpings AWS latency page.

Upvotes: 1

Related Questions