API Gateway to Oracle database in private cloud


Can API in AWS cloud interact with On-premises Oracle database?

1 Answer

Do you have a DirectConnect or IPSec VPN connectivity from your on-prem data center to an AWS VPC?

Also is there an application that is running in your on-prem that interacts with the Oracle database in your on-prem data center and exposes APIs.

If the answer to both is yes, then you can expose the APIs over AWS API Gateway.

You will need to use API Gateway Private Integration, for which you will need to create a Network Load Balancer and a VPCLink in your AWS VPC. There is a good tutorial that demonstrates how private integration can be configured, although the example does not specifically talk about connecting to on-prem resources - https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html

You can have your on-prem resources as targets for an AWS Network Load Balancer. There are some restrictions in terms of permitted IP ranges as target for the AWS Network Load Balancer and the details are available here - https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html. Read up the Target Type section.

The reason I asked the second question about an application is because AWS API Gateway cannot directly connect to an Oracle database, without an application in between. If you don't have an application, you can use AWS Lambda functions or create your own microservices in AWS ECS or EKS or even on EC2, that can connect to your on-prem database, although you have to run tests to make sure the latency is acceptable to your API consumers.

profile pictureAWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions