serverless-layers icon indicating copy to clipboard operation
serverless-layers copied to clipboard

deploymentBucket should defaults to reading from core

Open vicary opened this issue 3 years ago • 2 comments

Serverless is able to generate its own deployment bucket and this plugin should be able to read from it when not explicitly specified by users.

vicary avatar Aug 04 '22 11:08 vicary

It's a bit more complicated than it seems. That library runs before the hook that creates the default bucket, and I tried that before and I got a few issues that I can't remember now, but I reckon we need to attach the layer before before:package:initialize because serverless also check for changes (like when layer arn is attached/updated), for instance. So, when this plugin identifies a new change, it attaches the new arn to each function, and then sls is responsible to the handler after that. Not saying its impossible, but it probably will require a re-think on this library which probably makes more sense to do on next implementation maybe on serverless-layers 3.0

agutoli avatar Dec 26 '22 11:12 agutoli

@agutoli please take your time. We will fallback to a static bucket for existing projects, our future projects would definitely benefit when 3.0 is out.

vicary avatar Dec 26 '22 16:12 vicary