Open tstackhouse opened 3 years ago
I'd really love to see this feature. As is it right now, I can't use this plugin, as it would mean creating a S3 bucket beforehands, which is not the purpose of IaC.
Would it be a possibility to see this feature in the future ?
Does anyone have a workaround for this
I've been using this with the Deployment Bucket plugin, so that I'm not dynamically creating the deployment bucket, but it's still managed with serverless. The only downside for this is after doing sls remove
, I have to manually (or have a CI script) empty and remove the deployment buicket.
I would appreciate if this plugin exposed some hooks for me to use, but ig i'll use the same plugin as well
It is not something I'm planning to support/fix very soon, honestly. It would need a big refactoring which I can't do currently. https://github.com/agutoli/serverless-layers/issues/116
I would appreciate if this plugin exposed some hooks for me to use, but ig i'll use the same plugin as well
What kind of hooks
do you need?
If the serverless-layers package can implement a lifecycle named deployLayer
then serverless will auto generate a hook for me called before:deployLayer
, then I can write a short plugin as a small js file which integrates in my serverless file, reads the layersDeploymentBucket name from custom and creates the bucket / ensures the bucket is created, before the serverless-layers plugin takes over. I would prefer this over integrating the plugin @tstackhouse mentioned because
I also created an issue for this here #132
If no deployment bucket is configured,
sls deploy
will create a bucket dynamically, but this plugin does not pick up that bucket name and instead fails the entire deploy. This plugin would be very useful to packagenode_modules
as a dedicated layer and slim down individual function packages.