Why do you need DB connection is closed, not reusing it in Lambda function?
Each Lambda function running means a Container and they will be alive for a while after running(several 10min and if you call it in succession, it will keep alive).
Being alive means that each Lambda function keeps the memory area after it is running so that it can reuse them.
For example, If you define a global variable in Lambda function like below.
(Though it is python code, I think you can understand because it is as simple as enough)
variable = 10
def lambda_function(event, context):
global variable
print(variable)
variable += 1
If the Lambda function is called at every 1 sec, it will print like the below.
10
11
12
13
14
.
.
.
As you can see, every Lambda function called is using the same global variable.
What if the global variable is DB connection? You can reuse them not re-opening connection at every lambda-call.
However, as you said if 100 Lambda functions are simultaneously executed, 100 connections will be opened since each Lambda concurrency means different Containers respectively, having different memory area.
But finally, 100 connections will be reused for sequential 100 simultaneous execution.
---------- Edit ----------
I agree with @Arun's comment. My answer will be useful when traffic is steady and increasing and decreasing gradually so that the connections can be reused enough and closed by server-side's keep-alive. Radical increase and decrease of traffic could waste DB connection not closing appropriately.
---------- Edit ---------- 2019-12-17
AWS announced the new feature RDS proxy though it is preview yet.
If you connect RDS through RDS proxy, it will manage DB connection pool(Lambda <-> RDS) for you.
For detail, reference this link