简体   繁体   中英

Is there a way to configure Elastic Beanstalk to connect to an existing Oracle DB (without BYOL)?

I am trying to set up Elastic Beanstalk to connect to my existing AWS-hosted Oracle DB (the on-demand kind, not the Bring-your-own-license kind), but when I use the Elastic Beanstalk Console >> Environment Details >> Edit Configuration >> Database utility, I'm not even presented with an option to connect to an existing AWS RDS. The only option they provide is to " Create an RDS DB Instance with this environment". Fine, I'm flexible... there's more than one way to skin a cat, but when I attempt to Create an RDS DB (Oracle) Instance (using their drop-down "Oracle se-1" option), I get the error message "DB Instance class not supported for oracle db engine."

Is there a workaround? I just want to give my beanstalk access to my existing Oracle RDS and am grateful for any suggestions anyone has to offer. Please explain slowly... this is a new environment for me.

Here's the extremely helpful answer given by AWS Tech Support:

Hello,

In a typical scenario, the instances launched by ElasticBeanstalk will only allow HTTP connections from the Elastic Load Balancer , while the Elastic Load Balancer will accept HTTP requests from everywhere ( 0.0.0.0/0 ).

The most efficient way of allowing your RDS instance to be accessed by the Elastic Beanstalk instances would be to add the security group of the beanstalk instances in the RDS authorizations.

Checking Ec2->Security Groups you should have a security group with description "SecurityGroup for ElasticBeanstalk environment." , check the security group ID in the bottom pane, it has the format of sg-xxxxxxxx .

Authorize RDS access to that security by going to RDS -> Db Security Groups , you can either edit the Db current security group or create a new one (which you would then need to apply to the Db instance) , in the bottom pane select Ec2 Security Group instead of CIDR and add the Elastic Beanstalk Security Group ID sg-xxxxxxxx.

If you want to access the Db directly from Eclipse in your local computer you will also need to add your computer public ip as a CIDR (you can check your public IP by visiting a page like www.whatismyip.com )

You also need a JDBC driver in eclipse to be able to connect to the RDS Oracle instance.

I'm also attaching a printscreen of the Elastic Beanstalk that shows where you can pass a JDBC connection to your environment.

快照

No there is no way of connecting to an Existing Oracle DB without a BYOL license type. The BYOL means that you already own a valid Oracle license and would just like to use it. If you use the On-Demand, it means Amazon provides you a valid license included in the price, so having said this you would have to create a new Oracle DB instance which is what you are seeing in Elastic beanstalk.

The Oracle engine selection and License type selection is done while setting up Amazon RDS (like screenshot below). More info here .

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM