Many functions but only container?


My objective is to have only 1 lambda answering to plural SNS notifications.
For example, I want to create 1 lambda “user” with a method “update” and one “create”.
Depending on which SNS queue loads the lambda I want to execute one or another function (handler.update or handler.create).

So, I plan to create 1 service with 2 functions “update” and “create”.

My question is : if a lambda has been loaded from a SNS Queue “A” to run the function “update”. Will AWS create another lambda or will it use this one loaded to execute the “create” function following an event from the SNS Queue “B” ?

Does the behaviour differs with the “individually” option of “package” set to true ?

Hmmm I guess I have found a solution.

I just have to check the event.Records[0].Sns.TopicArn field to know how to route data :wink: