Is there any API to query a standard AWS RDS without using an SQL client? I see that there is a data API available for serverless Aurora databases (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) but it doesn't work for all RDS types and is not available in all regions at the moment either.
Due to internal firewall rules port 3306 is blocked so I'm looking for another way to talk to an RDS (running the RDS on port 443 has been suggested but is a non-trivial work-around).
Currently the Data API for Aurora Serverless (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) seems to be the only option.
There does not appear to be any equivalent API for standard Aurora databases.
Related
I have a requirement of replicating data from AWS RDS Postgres(12) Database to On-Premise Postgres(12) Database for disaster recovery purpose. I have found stuff about replication from On-premise to AWS RDS. But How can we implement it for AWS RDS to On-premise?
Any help will be much appreciated.
Hello I think you have two options here:
Use AWS Database Migration Service, setup source endpoint = pgsql on RDS, and target endpoint = pgsql on-premises, and setup DMS task for full load and CDC, detail you can refer to: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html, https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html
Setup replication from RDS pgsql to on-premises pgsql using pgsql native logical replication, there is a very good AWS blog talking exactly this: https://aws.amazon.com/blogs/database/using-logical-replication-to-replicate-managed-amazon-rds-for-postgresql-and-amazon-aurora-to-self-managed-postgresql/
I want to execute AWS CLI commands of RDS not via the internet, but via a VPC network for mainly creating manual snapshots of RDS.
However, VPC endpoints support only RDS Data API according to the following document:
VPC endpoints - Amazon Virtual Private Cloud
Why? I need to execute a command within closed network for security rules.
Just to reiterate you can still connect to your RDS database through the normal private network using whichever library you choose to perform any DDL, DML, DCL and TCL commands. Although in your case you want to create a snapshot which is via the service endpoint.
VPC endpoints are to connect to the service APIs that power AWS (think the interactions you perform in the console, SDK or CLI), at the moment this means for RDS to create, modify or delete resources you need to use the API over the public internet (using HTTPS for encrypted traffic).
VPC endpoints are added over time, just because a specific API is not there now does not mean it will never be there. There is an integration that has to be carried out by the team of that AWS service to allow VPC endpoints to work.
Is it possible to access Aurora Serverless DB from AWS Lambda?
In my case I have a Flutter mobile application which is communicating with Lumen micro framework through RESTful API. For DB I use MySQL.
After creating AWS Aurora cluster, can I connect to it like to a normal MySQL DB connection?
DB_CONNECTION=mysql
DB_HOST=my.awshost.com
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
I am relatively new to AWS. I've been only using EC2 so far. Therefore, I am trying to getting more familiar with Serverless concept.
Any help is appreciated.
Yes, you can access like other service but there is limitation of Serverless DB, it can only accessible within VPC, so you should define Lambda in the same VPC and configure networking.
Limitations of Aurora Serverless
Aurora with MySQL version 5.6 compatibility
Aurora with PostgreSQL version 10.7 compatibility
The port number for connections must be:
3306 for Aurora MySQL
5432 for Aurora PostgreSQL
You can't give an Aurora Serverless DB cluster a public IP address. You can access an Aurora Serverless DB cluster only from within a virtual private cloud (VPC) based on the Amazon VPC service.
Each Aurora Serverless DB cluster requires two AWS PrivateLink endpoints. If you reach the limit for PrivateLink endpoints within your VPC, you can't create any more Aurora Serverless clusters in that VPC. For information about checking and changing the limits on endpoints within a VPC, see Amazon VPC Limits.
You can't access an Aurora Serverless DB cluster's endpoint through an AWS VPN connection or an inter-region VPC peering connection.
aurora-serverless
You can explore getting-started-with-the-amazon-aurora-serverless-data-api for configuration lambda with Serverless DB.
My organization has an AWS presence, but no VPN nor Direct Connect to and from our on-premises data center. We would still like to leverage DynamoDB in the short-term without having DirectConnect or a VPN connection in place. We will not be using any EC2 instances for our web services. Is it possible for an on--prem host to talk to DynamoDB without any AWS networking infrastructure in place....basically a call direct to the DynamoDB service without VPN or Direct Connect?
All you need is an Internet connection to access DynamoDB. Your on-premis servers will need to have access to make calls to the AWS API, which is publicly accessible over the Internet.
You can use an VPC endpoint gateway to connect your server to Dynamo Db using amazon network
https://docs.aws.amazon.com/it_it/vpc/latest/privatelink/vpc-endpoints.html
Not a duplicate of AWS Aurora MySQL serverless: how to connect from MySQL Workbench.
Aurora Serverless doesn't support public connections yet.
I used Cloud9 to create an EC2 instance on the same VPN as the database. I then connected to the database from the Cloud9 terminal.
My (GraphQL Prisma) service that I'm attempting to host (on Zeit Now) only takes a HOST and a PASSWORD for configuration.
How can I make the EC2 instance act as a proxy that I can treat exactly as a database endpoint. Can tunneling fully do that and I'm just bad at it?
I think this blog may help you. The idea, is make a forwarding port from ec2-dns:3306 to aurora-serverless-cluster-dns:3306