AWS RDS Aurora PostgreSQL serverless: How to set public accessibility to Yes - postgresql

we have a instance of AWS RDS Aurora PostgreSQL Serverless with a vpc security group associated allowing connections from any place and any port, but we are unable to connect.
we always get the error "could not connect to server: Connection timed out "
We have found references to "public accessibility" parameter to solve the problem, but we are unable to find where to make the change.
Any help?
THanks

Aurora Serverless does not support publicly accessible endpoints at this time. It must be accessed from inside the VPC. Make sure you are attempting to connect to Aurora from within the VPC, and that the security group assigned to the Aurora cluster has the appropriate rules to allow access.

Related

Connect to RDS instance with PostgreSQL with AWS Secrets Manager?

I have an RDS instance utilizing PostgreSQL in a VPC. This DB uses Secrets Manager for authentication. I created an EC2 within the same VPC and subnet as my RDS instance. I have attached policies to give full access to my EC2 instance.
I have verified I can access Secrets Manager through this EC2 instance by getting a json response of the secretstring and other details.
I use this information to try and access my aurora-postgresql cluster to no avail. connection timed out.
DB accepts inbound traffic to port 5432.
Any tips on what to diagnose next?

Why am I getting connection timed out when connecting to AWS Document DB from my local machine with TLS disabled?

When utilizing AWS' connection string to connect to my Amazon Document DB instance in Robo3T I'm getting a 'Connection Timed Out' error.
Error connecting to ....cluster-....us-east-1.docdb.amazonaws.com:27017 (123.45.67.89:27017) :: caused by :: Connection timed out :
AWS does not currently support connecting to Document DB from public endpoints when not using SSH.
Connecting from Public Endpoints
You are trying to connect to an Amazon DocumentDB cluster directly
from your laptop or local development machine.
Trying to connect to an Amazon DocumentDB cluster directly from a
public endpoint, such as your laptop or local development machine,
will fail. Amazon DocumentDB is virtual private cloud (VPC)-only and
does not currently support public endpoints. Thus, you can't connect
directly to your Amazon DocumentDB cluster from your laptop or local
development environment outside of your VPC.
To connect to an Amazon DocumentDB cluster from outside an Amazon VPC,
you can use an SSH tunnel. For more information, see Connecting to an
Amazon DocumentDB Cluster from Outside an Amazon VPC. Additionally, if
your development environment is in a different Amazon VPC, you can
also use VPC Peering and connect to your Amazon DocumentDB cluster
from another Amazon VPC in the same region or a different region.
More details here: https://docs.aws.amazon.com/documentdb/latest/developerguide/troubleshooting.connecting.html#troubleshooting.cannot-connect.public-endpoints

Can AWS RDS Proxy be paired with read replication instance directly?

I created an RDS Proxy with existing Aurora PostgreSQL cluster.
But I want to pair the proxy with specific read replica instance of the cluster. Is that possible?
From what AWS claims about RDS proxy:
The same consideration applies for RDS DB instances in replication configurations. You can associate a proxy only with the writer DB instance, not a read replica.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html
Should be possible now as per https://aws.amazon.com/about-aws/whats-new/2021/03/amazon-rds-proxy-adds-read-only-endpoints-for-amazon-aurora-replicas/
Try RDS Proxy Endpoint, which allows you to get use of read replicas:
You can create and connect to read-only endpoints called reader endpoints when you use RDS Proxy with Aurora clusters. These reader endpoints help to improve the read scalability of your query-intensive applications. Reader endpoints also help to improve the availability of your connections if a reader DB instance in your cluster becomes unavailable.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html#rds-proxy-endpoints

Can I use the cloudsql-proxy to connect to a custom VM running postgres?

I have a custom Postgres instance running on a GCE VM. I am not using CloudSQL. I'd like to use the functionality provided by the cloudsql-proxy, but when I specify my custom instance the proxy fails.
googleapi: Error 404: The Cloud SQL instance does not exist., instanceDoesNotExist
It appears that only CloudSQL instances work and I don't understand the limitation. It seems like the proxy should work on any VM with port 5432 open.
Cloud SQL Proxy can only be used with Cloud SQL instances.
In the documentation About the Cloud SQL Proxy there is no mention about using it for custom databases inside GCE.
As it is stated in the documentation:
The Cloud SQL Proxy provides secure access to your Cloud SQL Second
Generation instances without having to whitelist IP addresses or
configure SSL.
However, I found some documentation about Access control overview where you can find an alternative to it.

How to reach hosted postgres in GCP from Kubernetes cluster, directly to private IP

So, I created a postgreSQL instance in Google Cloud, and I have a Kubernetes Cluster with containers that I would like to connect to it. I know that the cloud sql proxy sidecar is one method, but the documentation says that I should be able to connect to the private IP as well.
I notice that a VPC peering connection was automatically created for me. It's set for a destination network of 10.108.224.0/24, which is where the instance is, with a "Next hop region" of us-central1, where my K8s cluster is.
And yet when I try the private IP via TCP on port 5432, I time out. I see nothing in the documentation about have to modify firewall rules to make this work, but I tried that anyway, finding the firewall interface in GCP rather clumsy and confusing compared with writing my own rules using iptables, but my attempts failed.
Beyond going to the cloud sql sidecar, does anyone have an idea why this would not work?
Thanks.
Does your GKE cluster meet the environment requirements for private IP? It needs to be a VPC enabled cluster on the same VPC and region as your Cloud SQL instance.
In the end, the simplest thing to do was to just use the google cloud sql proxy. As opposed to a sidecar, I have multiple containers needing db access so I put the proxy into my cluster as its own container with a service, and it seems to just work.
If your instance of cloud SQL or compute both in the same VPC then only you can create a VPC peering over private IP.
From cloud SQL compute VM you can choose the VPC and subnet and also setup same for the GKE and you can make the connection from pod to cloud sql.