👋 I have a makefile to build my golang code when deploying. When promoting to different stages, is there a way to reuse the build artifact instead of building them again? Looks like this is handled already.
f
Frank
08/15/2021, 9:18 PM
Hey @Shine Li, when u promote, the Lambda packages are actually rebuilt. The main reason we do this is b/c certain Serverless Framework plugins can alter the code based on the
--stage
that’s passed in.
Frank
08/15/2021, 9:19 PM
I’m glad you pointed this out, this is an optimization we have in mind for SST projects.
Frank
08/15/2021, 9:20 PM
A workaround for now would be to upload the Lambda packages to S3 when you deploy to ie.
dev
, and when you promote to ie.
prod
, you can download them from S3.
Frank
08/15/2021, 9:21 PM
Let me know if you want to pursue this approach, I can share some code samples on this.