Nice boilerplate. I see you do a loop in Terraform to identify all required the Lambda functions.
I recently tried to solve a similar problem and arrived at a bit of a different solution. To identify the functions in a TypeScript script: https://github.com/goldstack/goldstack/blob/master/workspaces/templates-lib/packages/utils-aws-lambda/src/generate/collectLambdasFromFiles.ts#L90 and then read out all Lambdas from a TF variable: https://github.com/goldstack/goldstack/blob/master/workspaces/templates/packages/serverless-api/infra/aws/lambda_routes.tf#L13 .
Here some more information about the approach taken if you are interested https://docs.goldstack.party/docs/templates/serverless-api#development