You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently every lambda function has an identical stage.sh file in ach lambda directly, as the number of lambda functions grows this will become much harder to maintain if it ever needs to be changed. We should consolidate the staging in a single script. This will probably involve changing the bundle.sh scripts to all create an output folder name that is common to all lambda functions such as dist rather than the current pattern which is to use a unique name for each function. For example:
# we change thisecho"Building Lambda deployment package"
zip ${PACKAGE_FILE}${LAMBDA_SOURCE}
zip -gr ${PACKAGE_FILE} pinpoint-templates
# to thisecho"Building Lambda deployment package"
zip ${PACKAGE_FILE}${LAMBDA_SOURCE}
zip -gr ${PACKAGE_FILE} dist
The text was updated successfully, but these errors were encountered:
svozza
changed the title
Script repitition when staging lambda arrtifacts
Script repitition when staging lambda artifacts
Jan 14, 2021
Agree that this will be a growing maintenance issue over time as the number of Lambdas grow. Other options that have been considered are moving to sam package or aws cloudformation package.
So, I looked into SAM and unfortunately you can't use it with nested templates, see this issue: aws/aws-sam-cli#1213. Btw, if you're interested, in my fork I've created a skeleton of how to do API Gateway backed microservices that uses some of the serverless transforms without needing the SAM CLI: svozza#5.
Currently every lambda function has an identical
stage.sh
file in ach lambda directly, as the number of lambda functions grows this will become much harder to maintain if it ever needs to be changed. We should consolidate the staging in a single script. This will probably involve changing thebundle.sh
scripts to all create an output folder name that is common to all lambda functions such asdist
rather than the current pattern which is to use a unique name for each function. For example:The text was updated successfully, but these errors were encountered: