How can I connect to Aurora DSQL from Lambda without using a VPC?

0
18
Asked By CuriousKangaroo42 On

I'm working on a small web application hosted on AWS Lambda and I'm considering using Aurora DSQL as my database since it's cost-effective for apps that aren't used often. However, I've noticed that in order to connect my Lambda function to DSQL, I need to set it up inside a VPC, which requires a NAT Gateway for internet access. This setup would add around $30 to my monthly costs. Is there any way to bypass these expenses? Or should I just switch to using Aurora Serverless v2 with its scale-to-zero feature?

5 Answers

Answered By AvoidNATHero On

For those looking to avoid NAT Gateway costs, you might want to check out https://fck-nat.dev/; it offers insights on how to set things up without those expenses, which is super helpful.

Answered By TechWizard88 On

You actually don't need to put your Lambda in a VPC to access DSQL. DSQL has a public endpoint, which is enabled by default, allowing you to connect directly without additional infrastructure costs. You can check this by resolving the DNS record - it should provide a public IP address. Just make sure you format your endpoint correctly when setting it up!

FunkyCoder99 -

Wow, I didn't realize that! I was a bit confused by the CloudFormation outputs at first, but it turns out we can create the public endpoint URL like `.dsql..on.aws`, and it's accessible directly from my local machine. Thanks for clearing that up!

DataMaestro2021 -

Just a quick question: do you still incur any egress fees when using a public endpoint for the data leaving AWS?

Answered By CloudGuru202 On

I can confirm that you can successfully connect to DSQL using a Lambda outside of a VPC. I've done it myself and it's running great within the free tier as a side project! No additional costs involved.

Answered By DynamoDBCritic On

While DSQL is a solid choice, I must say I have my reservations about using DynamoDB. I had a tough experience using it for building a SaaS, and it was a struggle due to the limitations it imposed. DSQL seems to offer some of the benefits of DynamoDB without those downsides, especially for more complex data.

Answered By LambdaLover83 On

My non-VPC Lambda connects to DSQL without any issues. It runs smoothly and meets my needs just fine!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.