amazon-rds

Accessing Oracle from AWS Lambda in Python

為{幸葍}努か 提交于 2020-02-23 07:51:10
问题 I am writing (hopefully) a simply AWS Lambda that will do an RDS Oracle SQL SELECT and email the results. So far I have been using the Lambda Management Console, but all the examples I've run across talk about making a Lambda Deployment Package. So my first question is can I do this from the Lambda Management Console? Next question I have is what to import for the Oracle DB API? In all the examples I have seen, they download and build a package with pip, but that would then seem to imply

RDS to S3 using pg_dump directly (without intermediary)

a 夏天 提交于 2020-02-18 09:51:14
问题 It's possible run pg_dump in the RDS or in a S3 (without using a intermediary like ec2 to execute the command) 回答1: You should be able to access it as long as your db security group allows external access to port 5432 (default for postgres). Then you can just run: pg_dump -h <database_host> -U <username> <database> Keep in mind that your connection will not be encrypted. AFAIK, there is no interface in AWS between RDS and S3, so you would have to use an intermediary to transfer the data to S3

RDS to S3 using pg_dump directly (without intermediary)

独自空忆成欢 提交于 2020-02-18 09:47:44
问题 It's possible run pg_dump in the RDS or in a S3 (without using a intermediary like ec2 to execute the command) 回答1: You should be able to access it as long as your db security group allows external access to port 5432 (default for postgres). Then you can just run: pg_dump -h <database_host> -U <username> <database> Keep in mind that your connection will not be encrypted. AFAIK, there is no interface in AWS between RDS and S3, so you would have to use an intermediary to transfer the data to S3

Why can't I connect directly to my MySQL RDS DB Instance? (I can only connect via SSHing into an EC2)

馋奶兔 提交于 2020-02-08 09:43:51
问题 I made a MySQL RDS DB Instance, and I made sure the Instance is inside a security group which should allow me to connect to it externally. The security group allows all types of traffic from all IP addresses. The RDS is in the same security group as an EC2 I made. I'm able to connect to the DB Instance by connecting to the EC2 via SSH, then using the mysql CLI client I installed on that EC2 to connect to the RDS. However, I'm not able to connect directly to the RDS from a MySQL client on my

Can't query data on pgAdmin 4 but it works using psql and Python

北城以北 提交于 2020-02-07 02:29:45
问题 I have created a postgresql database on rds and I can connect and query it using psql on terminal or sqlalchemy on Python. When using pgAdmin4 I can't query or visualize the data but can create/alter tables, import data, ... I have also tried connecting it to Metabase and DBeaver but the connection times out. Any ideas why this is happening? I have also connected the database using pgAdmin3 and was able to visualize the data and query it, but since I am using postgresql 11.4 it is not fully

Can't query data on pgAdmin 4 but it works using psql and Python

巧了我就是萌 提交于 2020-02-07 02:28:55
问题 I have created a postgresql database on rds and I can connect and query it using psql on terminal or sqlalchemy on Python. When using pgAdmin4 I can't query or visualize the data but can create/alter tables, import data, ... I have also tried connecting it to Metabase and DBeaver but the connection times out. Any ideas why this is happening? I have also connected the database using pgAdmin3 and was able to visualize the data and query it, but since I am using postgresql 11.4 it is not fully

MySqlConnection Open() don't open and no error is caught

北城余情 提交于 2020-02-06 08:32:48
问题 I'm hosting an Aurora MySql instance on AWS and trying to read a table from it on a Lambda function. This is my connection string: Server=xxx.xxx.xxx4.xxx; port=3306; database=thedatabase; uid=theuser; pwd=thepassword; Connect Timeout=300 This is the code (.Net Core 2.1): private static void GetFromDb() { LambdaLogger.Log($"Function name GetFromDb() has been called.\n"); int counter = 0; try { LambdaLogger.Log($"Using {str}\n"); using (MySqlConnection conn = new MySqlConnection(str)) {

How to check all roles/user/group_role have what privileges in postgres database?

女生的网名这么多〃 提交于 2020-02-06 07:35:53
问题 I have postgres database. I want the list of users with access privileges they are being assigned. I tried to find query and also looked in to psql command line help. (\nu and all) but I haven't found any usefull information. Is anyone knows about that can help me out. Thanks. 回答1: There are few basic command like \du and \l that will provide the general information. For getting the detailed information you may use the below function. CREATE OR REPLACE FUNCTION database_privs(text) RETURNS

How to configure credential rotation in AWS Secret Manager?

非 Y 不嫁゛ 提交于 2020-02-05 04:26:16
问题 I read this article about how to implement the credential rotation, I know I could just configure this in 'Edit rotation configuration' option, but the thing is my current secret is in use, and I notice that it says 'Enable automatic rotation - Recommended when your applications are not using this secret yet', how can I enable the rotation then? My database is using RDS Aurora MySQL engine and I want it to rotate every 7 days. I also read this document, does it mean I must have an IAM role

How to export SQL Output directly to CSV on Amazon RDS

旧巷老猫 提交于 2020-01-24 17:15:10
问题 Amazon doesn't give Access to RDS Server directly ( they expose it only through service RDS) hence, "select into outfile" doesn't work.. Even the master user does not have privileges of FILE. I created ticket with Amazon; talked at length with them.. They suggested few work-around like using Data Pipeline etc.. but all are too complicated.. Surely one of the way could be to use tool like MYSql Workbench --> execute query --> Export to CSV.. Only problem with this approach is that you need to