https://serverless-stack.com/ logo
#random
Title
# random
t

thdxr

10/14/2021, 2:23 PM
Who is using RDS Data API?
s

Sean Matheson

10/14/2021, 2:25 PM
Ooof, yes! Does this mean an Aurora construct is in the works? 🙂
I have used, but not directly. I used a TypeORM driver which abstracted it away.
t

thdxr

10/14/2021, 2:27 PM
😄 yep
What do you think of this: https://github.com/koskimas/kysely
s

Sean Matheson

10/14/2021, 2:30 PM
mindblown
just awesome what this TS feature is unlocking
do they have a data api driver?
t

thdxr

10/14/2021, 2:32 PM
I added basic data api support to it yesterday, need to add transaction support but it'll be good to go after that
s

Sean Matheson

10/14/2021, 2:32 PM
what a legend
you rock my world
sst is just so underrated right now
t

thdxr

10/14/2021, 2:33 PM
We're trying to figure out a good default setup to recommend for people who want to use RDS. Think data api is the way to go to avoid any connection pooling problems with lambda
n

Nick Laffey

10/14/2021, 2:34 PM
FYI, We’d love to use MikroORM but have had issues because there aren’t currently data API drivers. Anyone else running into that and have recommendations?
s

Sean Matheson

10/14/2021, 2:38 PM
I fully agree. If you are going to go for the serverless model you may as well go straight for the DB solutions that play nicely with it. RDS Proxy etc is just a band aid on existing limitations.
Having these abstractions over Data API will go a long way towards encouraging first choice adoption of the more robust solution
@Nick Laffey it sounds like @thdxr is already working on an alternative. You can look at TypeORM in the interim too. They have a data api driver, and are also TS first approach.
n

Nick Laffey

10/14/2021, 2:40 PM
👍 Yeah we’re currently using TypeORM but have a preference for MikroORM.
s

Sean Matheson

10/14/2021, 2:41 PM
I much prefer the sql builder approach over entity style orms. Really excited for your work @thdxr
n

Nick Laffey

10/14/2021, 2:45 PM
Yeah I like that idea too but we’re currently using GraphQL/ApolloAPI integrated with the TypeORM/MikroORM.
Seems nice if we can get it to work 🙂
s

Sean Matheson

10/14/2021, 2:47 PM
Love the insight into Prisma you provided on the issue. I had the same experience and criticisms. Prisma is amazing, but those limitations really miss the boat in terms of where things are headed.
Feels like christmas seeing this in the works
t

thdxr

10/14/2021, 2:50 PM
Yeah I was really excited when I found this library, was the missing piece I was looking for. It's super well written too
s

Slawomir Stec

10/14/2021, 3:07 PM
unfortunately data api is not available everywhere (14 regions at the moment)
s

Sean Matheson

10/14/2021, 3:21 PM
@thdxr will the data driver also support the db migrations features of kysely?
t

thdxr

10/14/2021, 3:24 PM
Yep that's actually what I've been using to test with
running the default migrations he has in the example
j

Jack Fraser

10/14/2021, 3:26 PM
@thdxr when do you think you will be ready with that amazing dataapi support for Kysely?
From my understanding the DataApi is the only practical way to use Aurora Serverless Postgres with Lambda
t

thdxr

10/14/2021, 3:27 PM
Well now that everyone is excited about it...maybe I should go faster
Let me see where I get to at the end of this week
p

Patrick Young

10/14/2021, 4:15 PM
I asked in the MikroORM channel if anyone has built a data api driver for Mikro. Someone has and is looking into open sourcing it 🎉 . Mikro for me is a large step up from typeorm although Kysely looks pretty sweet!
Also, @thdxr work faster! 😉 🤣
I just tried to setup RDS proxy and I hated it... Mostly because I don't know what I'm doing 🙂.
j

Jack Fraser

10/14/2021, 4:19 PM
@Patrick Young - Data API is the way to go if you can 🙂
p

Patrick Young

10/14/2021, 4:26 PM
Yeah I would love to keep serverless aurora as it fits our needs but my knowledge in this area is limited so creating a data api for Mikro seems like a buggy bad time...
t

thdxr

10/15/2021, 3:23 AM
Need to test migrations....but I think I got it all working 😄. 99% of the credit goes to the creator of kysely, his abstractions are so good. Really really easy to integrate data api
s

Sean Matheson

10/15/2021, 7:30 AM
I had a look at your source. Surprisingly little code. Agreed that huge hat tip goes towards their API design.
This is so rad. I am proper excited about this. 🙂
I was looking at Dynamo due to ease of use, but now strongly considering Aurora again.
l

Lukasz K

10/20/2021, 12:31 PM
Oh wow. Can't wait to test this out! (which may be a while, we're currently running mysql). Any idea if AWS team fixed implemented the
arrayValue
type yet? Can't find any mention of it being worked on and I've been running a year-old data-api-client, mostly monkey patching via over-the-top validation + string concats for
WHERE ... IN (...)
functions Also, ❤️ the unsupported switch case in your serializer
c

Carter Himmel

12/13/2021, 4:51 AM
fwiw, i plan on using aurora clusters with hasura in an upcoming project
b

Brinsley

12/14/2021, 11:48 AM
@thdxr How far did you get on this? Currently in a situation where I’m trying to decide how I’m going to handle dealing with RDS from a lambda. Looked at TypeOrm but then saw kysely is this thread which looks cleaner. Anything upcoming on your end?
t

thdxr

12/14/2021, 1:05 PM
It all works so kysely is an option
I've been using it
b

Brinsley

12/14/2021, 1:21 PM
Coolies, have had a quick play with it and it seems quite nice. Never been a fan of using decorators/annotations to handle this sort of stuff.
2 Views