Top all-time · #15751
Rowan Udell
Personal blog · blog.rowanudell.comprogrammingsecurity
Rowan Udell's personal blog at blog.rowanudell.com covers programming and security. Since 2016, 5 different Hacker News readers have linked it 5 times, most often “Scheduling Lambda Functions with the AWS CLI”. It is still writing: the last post was on 2025-07-24, and you can follow it by feed.
Too few sampled comments (3) to say how often HN recommends it.?
Why HN links it
HN readers link this blog for posts on reusing database connections in AWS Lambda by defining them outside the function handler so they persist across warm container invocations.
Summarised by Claude from a sample of 3 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
AWS security, code, and compliance
Most-linked posts?
- /database-connections-in-lambda/3 people · 3 mentions · first linked 2017-11-29
- Scheduling Lambda Functions with the AWS CLI2 people · 2 mentions · first linked 2016-01-17
What Hacker News says?
Sounds like this person explains what you're asking for: http://blog.rowanudell.com/database-connections-in-lambda/
Comment linking /database-connections-in-lambda/
on “Go Is a Great Fit for Lambda”Submitted Scheduling Lambda Functions with the AWS CLI as a story · 2 points
HN discussionRight, and one of biggest downsides to serverless: reusing database connections/pools between requests. Right now the only "standard" solution offered by serverless's biggest advocates is pretty much a hack: rely on AWS's preservation of memory across some warm invocations. Basically keep it in a global variable and if you get lucky it'll still be there the next time your functions runs. [1] http://blog.rowanudell.c…
Comment linking /database-connections-in-lambda/
on “AWS Lambda and .zip is a recipe for serverless success”Submitted Scheduling Lambda Functions Using CloudWatch Events as a story · 1 points
HN discussionThanks, but I think this is very different from connection pooling on a DB, say pdbouncer. Doing some searching, I did find this that seems much closer: http://blog.rowanudell.com/database-connections-in-lambda/ TLDR; you can define the connection to DB outside of the scope of a given function, so it’s scoped to the container and can be reused so long as the container is not recycled. Seems promising!
Comment linking /database-connections-in-lambda/
on “In The Works – Amazon Aurora Serverless”