Our CI/CD system currently stores our zip bundles in two locations:
- A “snapshot” bucket with all recent builds. This gets cleaned up every 30 days using S3 lifecycle rules.
- A “latest” bucket with the most recent copy of all services in our product.
The “snapshot” bucket seems to work well with what sls package
does by default with timestamps to denote the builds. No issues here.
For our “latest” bucket, we use a flatter directory structure without any timestamps. We can specify this bucket as the deployment bucket by passing a command line option and using variables inside of our serverless.yml
file. However, I don’t see any way to customize the s3Key that will be inserted into the compiled CloudFormation template.
Is it possible to also specify a different value for the s3Key when using sls package
?