amazon-rds

Connecting to Oracle RDS

巧了我就是萌 提交于 2019-12-01 06:13:25
I am trying to connect to Oracle using AWS lambda and python. These are the step I followed. (Everything has done EC2 instance) Downloaded the instantclient-basic-linux.x64-12.2.0.1.0.zip and instantclient-sdk-linux.x64-12.2.0.1.0.zip Created this folder structure ~/lambda/lib/ Extracted the zip files in the ~/lambda/lib/ copied the libaio.so.1.0.1 from /lib64/ into ~/lambda/lib/ Created symbolic link of libaio.so.1.0.1 as libaio.so in ~/lambda using pip installed cx_Oracle in ~/lambda written below index.py script in ~lambda ` import cx_Oracle def handler(event, context): message = "" cursor

Connecting to Oracle RDS

久未见 提交于 2019-12-01 05:59:05
问题 I am trying to connect to Oracle using AWS lambda and python. These are the step I followed. (Everything has done EC2 instance) Downloaded the instantclient-basic-linux.x64-12.2.0.1.0.zip and instantclient-sdk-linux.x64-12.2.0.1.0.zip Created this folder structure ~/lambda/lib/ Extracted the zip files in the ~/lambda/lib/ copied the libaio.so.1.0.1 from /lib64/ into ~/lambda/lib/ Created symbolic link of libaio.so.1.0.1 as libaio.so in ~/lambda using pip installed cx_Oracle in ~/lambda

PostgreSQL RDS avoid hard coding the connection password when using dblink_connect()

烈酒焚心 提交于 2019-12-01 04:48:34
问题 I have an AWS RDS instance of PostgreSQL in which I need to execute an SQL statement within a function using dblink_connect(text) and dblink_exec(text) while logged in with the postgres role (that I created). CREATE OR REPLACE FUNCTION application.create_tenant_schemas(first integer, last integer) RETURNS void AS DECLARE tenant VARCHAR; sql VARCHAR; BEGIN FOR index IN first..last LOOP tenant := 'tenant_' || to_char(index, 'FM00000'); sql := 'CREATE SCHEMA ' || quote_ident(tenant); RAISE

Error: connect ETIMEDOUT rds lambda

可紊 提交于 2019-12-01 03:19:20
I am trying to connect to RDS using Lambda function, but I am getting an error: var mysql = require('mysql'); exports.handler = function(event, context) { //Connect to RDS var connection = mysql.createConnection({ host : 'hostname', user : 'username', password : 'password', database : 'database' }); connection.connect( function(err) { if (err) { throw err; } else { console.log('DB connection establish'); } }); }; The error I am getting is: START RequestId: 9711e650-e582-11e5-af5f-97ba391a42ae Version: $LATEST 2016-03-08T23:08:06.737Z 9711e650-e582-11e5-af5f-97ba391a42ae Error: connect

How to connect to Amazon RDS via SSL?

拥有回忆 提交于 2019-12-01 02:23:18
I'm trying to set up an SSL connection to a MySQL database hosted via Amazon RDS. I'm confused as to how to connect. According to Amazon's documentation , I need to download a CA certificate called "rds-ca-2015-root.pem" and use it in my SSL connection. I set the database user that I am connecting with to require SSL. In PHP, I include the code below to initiate the connection: $mysqli = mysqli_init(); mysqli_options($mysqli, MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, true); $mysqli->ssl_set(NULL, NULL, "/path/to/pem", NULL, NULL); $mysqli->real_connect("host", "username", "password", "name", 3306,

Oracle.ManagedDataAccess to AWS RDS DB - TCPS: Invalid SSL Wallet (Magic)

放肆的年华 提交于 2019-12-01 00:27:35
I am trying to connect to a Amazon RDS instance via the Oracle.ManagedDataAccess Nuget package using a SSL certificate. I can connect successfully via SQL*Plus using a wallet generated using orapki. Wallet generated by following the AWS instructions I want do the same via Oracle.ManagedDataAccessin C# and I am trying to use the same wallet. My C# looks like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Oracle.ManagedDataAccess.Client; namespace OracleDataAccess { class Program { static void Main(string[] args) {

What would prevent me from connecting to a MySQL server on AWS RDS from an AWS EC2 VM?

本小妞迷上赌 提交于 2019-11-30 19:39:30
问题 I have a MySQL RDS instance in AWS which has been set up properly. I also have a Linux EC2 instance in AWS. However, I can't connect to my RDS instance from the EC2 instance. I can connect to the RDS instance from my own laptop, however. I suspect it is one of four things interface binding of the RDS instance - it is listening on the external interface but not on the internal one firewall for the RDS instance - it is allowed connections from outside the AWS network but not from inside

Configure GlassFish JDBC connection pool to handle Amazon RDS Multi-AZ failover

本小妞迷上赌 提交于 2019-11-30 14:19:39
问题 I have a Java EE application running in GlassFish on EC2, with a MySQL database on Amazon RDS. I am trying to configure the JDBC connection pool to in order to minimize downtime in case of database failover. My current configuration isn't working correctly during a Multi-AZ failover, as the standby database instance appears to be available in a couple of minutes (according to the AWS console) while my GlassFish instance remains stuck for a long time (about 15 minutes) before resuming work.

AWS CLI create RDS with elasticbeanstalk create-environment

守給你的承諾、 提交于 2019-11-30 13:54:20
How can I create an RDS instance with the create-environment or another subcommand of aws elasticbeanstalk ? I've tried several combinations of parameters to no avail. Below is an example. APP_NAME="randall-railsapp" aws s3api create-bucket --bucket "$APP_NAME" APP_VERSION="$(git describe --always)" APP_FILE="deploy-$APP_NAME-$APP_VERSION.zip" git archive -o "$APP_FILE" HEAD aws s3 cp "$APP_FILE" "s3://$APP_NAME/$APP_FILE" aws --region us-east-1 elasticbeanstalk create-application-version \ --auto-create-application \ --application-name "$APP_NAME" \ --version-label "$APP_VERSION" \ --source

Using Java to establish a secure connection to MySQL Amazon RDS (SSL/TLS)

瘦欲@ 提交于 2019-11-30 12:04:42
问题 I am trying to securely connect to Amazon RDS using JDK 1.8 and MySQL Connector/J version 5.1.23 and I am confused about the instructions in MySQL Connector/J documentation. The instructions say to create a truststore in the current directory and import the server's CA certificate. When I run the below command I am asked for a password and I do not know what to enter: keytool -import -alias mysqlServerCACert -file file_location.pem -keystore truststore The instructions from Amazon on the