user2737948
user2737948

Reputation: 339

Aurora serverless connection timed out

I'm trying to connect to my aurora serverless but every time I try to do it I receive this error:

2021/03/18 17:10:00 error verifying database connection is alive: dial tcp 10.247.15.113:3306: connect: operation timed out exit status 1

I created a VPC, subnets and security groups.

Using ssh in a database client works but inside my code I receive the error I mentioned, I also tried doing telnet and I receive another operation timed out.

I know this may be something related to the networking but not sure why since I can connect via ssh with an EC2 instance. What can it be?

Upvotes: 0

Views: 3379

Answers (1)

Marcin
Marcin

Reputation: 238051

Your guide is for RDS. It does not apply to Aurora Serverless (AS). Specifically AS can't be accessed from internet. So you can't connect to it directly from home:

You can't give an Aurora Serverless v1 DB cluster a public IP address. You can access an Aurora Serverless v1 DB cluster only from within a VPC.

You have to connect to it from within a VPC, e.g. EC2 instance, ECS container or a lambda function.

The only way to connect to it from home is to use RDS DataAPI, or setup ssh tunnel or VPN between your home network and your VPC.

Upvotes: 1

Related Questions