amazon-connect / amazon-connect-salesforce-lambda

Apache License 2.0
45 stars 34 forks source link

Use codeuri values in template.yaml #10

Open tim-pugh opened 3 years ago

tim-pugh commented 3 years ago

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).