Doing it this method isn't very good because it ends up deploying many lambdas with the same exact deployment packages.
Having a codeuri value per AWS::Serverless::Function parameter is a better choice.
You can launch the sam template > go to any two Lambda functions it deploys > you'll see the same exact code.
I found this was a bit of a headache when debugging a permission error/stack trace (and since we use env variables in the code to invoke other similarly named functions, you can start running in circles a bit and get the functions mixed up).
https://github.com/amazon-connect/amazon-connect-salesforce-lambda/blob/master/sam-app/lambda_functions/template.yaml#L183
Doing it this method isn't very good because it ends up deploying many lambdas with the same exact deployment packages.
Having a codeuri value per AWS::Serverless::Function parameter is a better choice.
You can launch the sam template > go to any two Lambda functions it deploys > you'll see the same exact code.
I found this was a bit of a headache when debugging a permission error/stack trace (and since we use env variables in the code to invoke other similarly named functions, you can start running in circles a bit and get the functions mixed up).