0

I have a NodeJs web application running on amazon EC2 server. Now from this node app in EC2, I have to access a database system (SqlServer) which is in the customer's in house network which can be accessed only with a VPN. What are the possible ways to do this?

Note: - In house db cannot be exposed to public

  • when you manually ssh over to your machine where your nodejs executes what are you using to connect to the VPN ? TLS certs ? ... if possible do something manually first then write code to automate – Scott Stensland Jun 21 '18 at 13:32

2 Answers2

2

There are a three options:

1) Expose your database publicly, and connect from your app using a secure protocol (i.e. ssl). This is probably a horrible idea, but is possible.

2) Set up a VPN between AWS and the data center where the database lives. This is a quick, easy way to set up a hybrid architecture.

3) Set up Direct Connect between AWS and the data center. This can reduce latency, provide network sovereignty, and depending on the amount of traffic between the app and the db may actually be cheaper than option 2.

chris
  • 36,094
  • 53
  • 157
  • 237
  • Thanks @chris for the answers. Option 2 and 3 looks great. But availability is the factor I am afraid about. If the VPN gets disconnected for no reason, reconnecting manually is the only option I can think about. Any alternate solution for this? – Nikhil Dominic Jun 25 '18 at 06:10
  • The AWS VPN solution has the option for 2 redundant tunnels (separate devices on the AWS side) and the provided firewall config tells you how to configure automatic failover on your end. It is a very reliable solution. – chris Jun 25 '18 at 12:39
0

You can setup a VPN between the VPC and the customers network.

ref : https://aws.amazon.com/premiumsupport/knowledge-center/create-connection-vpc/

chris
  • 36,094
  • 53
  • 157
  • 237
Gabriel Bleu
  • 9,703
  • 2
  • 30
  • 43