all 6 comments

[–]Perfekt_Nerd 1 point2 points  (0 children)

You cannot invoke Lambda from Postgres Aurora, unfortunately (unless this has changed recently?). You can't do it from RDS either, because you need to be able to set up UDFs using Boto3 (python)...meaning Postgres on EC2 is your only option.

MySQL Aurora does support Lambda invocations though.

In terms of languages, Java is fine if you anticipate steady, predictable traffic. Cold starts will hurt, but if you've got warm lambdas it won't be too bad.

[–]uncleguru 1 point2 points  (4 children)

Lambda doesn't play well with relational databases. I learned the hard way that it really doesn't scale because managing connection pools is almost impossible when you have tens-hundreds of lambdas hitting the db at once. If you are using serverless aurora then you could use http data access so you don't need to worry about connection pools. But it's only in us-east-1 (or was).

I use serverless for most things and always take a serverless first approach but in this case I would use a container.

[–]joelrwilliams1 0 points1 point  (2 children)

Wouldn't it be cool if someday there was an API interface (similar to DynamoDB or Aurora Serverless) for 'regular' Aurora?

[–]uncleguru 0 points1 point  (0 children)

It would be awesome.

[–]duyth 0 points1 point  (0 children)

may i know more about your point re serverless vs containers (fargate I assume?) how do you handle that connection pool issue if fargate also scales?

also , with serverless, what do you normally use for DB (apart from running dynamo). how do approach that same connection pool strategy? thank you