sam-goodwin / punchcard

Type-safe AWS infrastructure.
Apache License 2.0
506 stars 20 forks source link

Feature req: provide an abstraction for 'relational database in lambda' #120

Open Birowsky opened 4 years ago

Birowsky commented 4 years ago

You've already done a beautiful job when providing dynamodb table as a lambda dependency.

Have you given this a thought for a relational database? Say, Aurora Serverless?

I've been trying to find a definitive answer for how to ideally set up rds for lambda without much success. So I thought there's a chance that you may've looked into this, you know, the regular serverless use case: Api Gateway -> Lambda -> RDS. I pointed out Aurora Serverless because of that 'data api' feature it provides.

Thanx!

sam-goodwin commented 4 years ago

Yeah i so keen to do this too! I've got https://github.com/punchcard/punchcard/pull/112 in the works that'll be tackling this problem exactly - provisioning, schemas and migrations.

Will be getting to that once i finish the AppSync stuff https://github.com/punchcard/punchcard/pull/119. Going to support calling from Lambda or from an AppSync resolver.

Birowsky commented 4 years ago

Awesome! Since it doesn't say anything about provisioning, do you mind sharing how do you intend to handle the db connection pool?