Scenario
I have several lambda functions that will all work under the same enviroment (node v14.x). These functions will be independently (maybe in the future they will need to communicate with each other)
Problem
I have seen that we can use public.ecr.aws/lambda/nodejs:14.2021.12.23.17 image to use Node's image. But in this example we are talking about a single lambda function.
My project is as follow:
lambda-functions
- lambda function A
- lambda function B
- lambda function C
What I'm looking for is a scenario where I can dockerize all of these lambda functions under the same project.
I have been looking into docker-compose and I was thinking of having my solution as follow:
lambda-functions
- lambda function A
- Dockerfile
- lambda function B
- Dockerfile
- lambda function C
- Dockerfile
- docker-compose.yml
Question
Is this a good approach to this problem? Are there other options that I can follow, if yes which ones? With this approach, is it possible to deploy the image of each lambda function to AWS? Would it be possible to do some integration testing here?
I understand that this question seems a bit open ended question but what I'm looking for are options and understand if my solution is feasible. Any advice would be highly appreciated.