serverless-sam
serverless-sam copied to clipboard
Incompatible with other packaging plugins
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.
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?
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
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.
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.
What is the status of this issue?