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

Incompatible with other packaging plugins

Open oharaandrew314 opened this issue 7 years ago • 5 comments

I'd like to be able to use another plugin e.g. serverless-wsgi, to package my deployment and then have sls sam export use that package.

One solution would be to add a --package argument, e.g . sls sam export --output foo.yml --package my-package-dir to allow me to use an existing package, similar to how sls deploy works.

Another solution would be to package the same way as sls package does. When your plugin packages the deployment, it somehow doesn't generate the same package as sls package does, because it seems to skip my other package plugins.

oharaandrew314 avatar Sep 11 '17 15:09 oharaandrew314

Thanks for the feedback @oharaandrew314 - I will go through and review the packaging. When I wrote this plugin the Serverless packaging function was in flux and being changed. Which version of serverless are you using?

sapessi avatar Nov 15 '17 22:11 sapessi

I'm trying to use serverless-parameters with serverless-sam and running into issues too. I've submitted a PR to serverless-parameters to add the before:package:createDeploymentArtifacts hook but now I'm trying to figure out how I can get that to execute when using sls sam export

I'm on 1.25.0

tmclaugh avatar Jan 22 '18 23:01 tmclaugh

hey @tmclaugh, I've just merged #15 that enables params and conditions export - I've published version 0.0.4 of the library on NPM.

sapessi avatar Jan 22 '18 23:01 sapessi

I found out my issue was caused by using svdgraaf/serverless-parameters and the fact that it has you define parameters in the custom section and not the resource section.

This points out a larger issue though. You're transforming the serverless.yml to a SAM template but you're not going through the motions of rendering all the resources created by other plugins. One plugin I've used before that does this is medikoo/serverless-plugin-dynamodb-autoscaling which creates autoscaling resources.

I've solved my current project's problem (thanks for that!) but I see others in the future.

tmclaugh avatar Jan 23 '18 18:01 tmclaugh

What is the status of this issue?

bowbahdoe avatar Jun 29 '18 16:06 bowbahdoe