is it possible to use SLS to just package your function? For example, assume I’ve already used Terrraform to create a lambda and the lambda’s source is in an S3 bucket. Using the CLI I could push a new zip file into S3 and “refresh” my lambda. I would like to use SLS simply to build this zip file that I need to push. I don’t need to “deploy” anything or set up any infrastructure.
I want my Jenkins build to
- checkout my repo
- run “npm -i --only=prod”
- run “npm run package” (this will be where I use SLS, and the results are “dist/foo.zip”, for example)
- scp dist/foo.zip <nexus | artifactory | s3>
I want my Jenkins deploy to
- scp /foo.zip .
- aws-cli copy ./foo.zip to s3-bucket (https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html)
- aws-cli update lambda function (https://docs.aws.amazon.com/cli/latest/reference/lambda/update-function-code.html)
would something like that be possible???