Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Incompatible with dynamic deployment buckets #70

Open
tstackhouse opened this issue Jun 2, 2021 · 7 comments
Open

Incompatible with dynamic deployment buckets #70

tstackhouse opened this issue Jun 2, 2021 · 7 comments

Comments

@tstackhouse
Copy link

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 package node_modules as a dedicated layer and slim down individual function packages.

@AxopenLyon
Copy link

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 ?

@Rayyan98
Copy link

Rayyan98 commented Jan 5, 2023

Does anyone have a workaround for this

@tstackhouse
Copy link
Author

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.

@Rayyan98
Copy link

Rayyan98 commented Jan 5, 2023

I would appreciate if this plugin exposed some hooks for me to use, but ig i'll use the same plugin as well

@agutoli
Copy link
Owner

agutoli commented Jan 6, 2023

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.
#116

@agutoli
Copy link
Owner

agutoli commented Jan 6, 2023

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?

@Rayyan98
Copy link

Rayyan98 commented Jan 6, 2023

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

  1. It is explicit control over execution flow,
  2. The small js file is very explicit about what it does and any developer that comes after me will be able to figure out why its necessary and they can safely remove it when serverless-layers plugin itself implements deploymentBucket should defaults to reading from core #116

I also created an issue for this here #132

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants