You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deployment is failing with message Template format error: Outputs count 69 is greater than max allowed 60. after upgrade to 1.3. There is a similar issue #2466 however it doesn't look to be related, the deployment ends well when I downgrade back to 1.2.
Oh, that would mean a lot of rewriting I'm afraid (not just in the code itself but also in our deployment scripts built around Serverless). To be honest, I would be happier if it can be solved differently (and fast, above all). We wanted to have our service running already and were waiting just for the fix of deployment to VPC in v1.3. So this is a little bit unpleasant surprise. ;o) And what about this plugin from #2466: https://github.com/Brigad/serverless-remove-cf-outputs-plugin/blob/master/src/index.js, would it help? (I don't understand it's consequences.) Thanks.
That would be a breaking change. I've moved it to the v2.0 milestone. We'll look into this issue. Not sure about the plugin. It's removing the outputs but at a first glance it's hard to understand which outputs it actually removes...
Would it be possible for you to post the generated template from v1.3? It should be located in .serverless/cloudformation-template-update-stack.json. Then we could see exactly what the output is, and where those other resources are being created.
Sure, here it is: cloudformation-template-update-stack.json.txt (I just did some obfuscations in env vars and added txt suffix to the filename because it seems that Github doesn't like jsons). Thanks for your help.
It will produce 1 output per function. Instead of doing this we should create one skeleton output in the compileFunctions method below. The ARNs can then be computed on the fly (e.g. for the info) plugin.
Unfortunately this is a breaking change as people might use the ARNs form the output section in their code somehow... Still not sure if this means that Serverless will reach v2 soon or if splitting a large service with dozens of function up into multiple separate ones is a better solution for now...
This issue is causing problems for me as well. I do not like the idea of "splitting up a large service into multiples" because I don't want multiple APIs for one logical service.
I am not sure what problem is being solved by placing a limit in the first place. V1.2 doesn't seem to have an issue.
After looking at this problem a little closer, i don't see this as a CloudFormation problem. Yes, there is a max of 60 aloud, but it looks as though serverless declares outputs for nearly everything in the template. I think a better solution would be to allow the developer to declare what the outputs should be. Maybe a simple flag in the function definition?
There isn't a lot of documentation on the severless web site regarding the Resources section so maybe this is already possible.
We've just merged @ryansb PR #3042 so that you can now opt out of function versioning.
Furthermore we've PRed a changed so that function arns are no longer added as Outputs and will be computed on the fly when running the info command: #3125
This way the Outputs size should be reduced dramatically.
Closing this issue since the next Serverless release (v1.6) which is just around the corner will include those merged PRs. Feel free to comment if this is still a problem (after updating to v1.6) and we'll reopen.
Activity
pmuens commentedon Dec 3, 2016
Thanks for reporting @JakubMatejka 👍
Could you do a
serverless info --verboseto see all the stuff which is in your Outputs section?This might have something todo with the Lambda versioning support #2676
/cc @eahefnawy @mthenw @nikgraf
JakubMatejka commentedon Dec 3, 2016
Well, there are 37 outputs (and v1.2 shows the same).
Here is whole output of
serverless info --verbose:pmuens commentedon Dec 3, 2016
@JakubMatejka thanks for posting. That's a long list.
Hmm. Nothing exceptional either... Is there any chance to split this up into multiple services as this seems pretty large.
This refactoring might also help: #1825 (planned for 2.0).
JakubMatejka commentedon Dec 3, 2016
Oh, that would mean a lot of rewriting I'm afraid (not just in the code itself but also in our deployment scripts built around Serverless). To be honest, I would be happier if it can be solved differently (and fast, above all). We wanted to have our service running already and were waiting just for the fix of deployment to VPC in v1.3. So this is a little bit unpleasant surprise. ;o) And what about this plugin from #2466: https://github.com/Brigad/serverless-remove-cf-outputs-plugin/blob/master/src/index.js, would it help? (I don't understand it's consequences.) Thanks.
pmuens commentedon Dec 4, 2016
Hmm true. Nice catch!
That would be a breaking change. I've moved it to the v2.0 milestone. We'll look into this issue. Not sure about the plugin. It's removing the outputs but at a first glance it's hard to understand which outputs it actually removes...
ryansb commentedon Dec 5, 2016
This one isn't related to #2676, since it doesn't add outputs for old versions: only for the current one.
ryansb commentedon Dec 5, 2016
Would it be possible for you to post the generated template from v1.3? It should be located in
.serverless/cloudformation-template-update-stack.json. Then we could see exactly what the output is, and where those other resources are being created.In the near term, https://github.com/Brigad/serverless-remove-cf-outputs-plugin may fix your issue.
JakubMatejka commentedon Dec 5, 2016
Sure, here it is: cloudformation-template-update-stack.json.txt (I just did some obfuscations in env vars and added txt suffix to the filename because it seems that Github doesn't like jsons). Thanks for your help.
pmuens commentedon Dec 6, 2016
Thanks for the heads up @ryansb and thanks for posting the output @JakubMatejka
I think these are the LOC which will cause most of the trouble: https://github.com/serverless/serverless/blob/master/lib/plugins/aws/deploy/compile/functions/index.js#L187-L196
It will produce 1 output per function. Instead of doing this we should create one skeleton output in the
compileFunctionsmethod below. The ARNs can then be computed on the fly (e.g. for theinfo) plugin.Unfortunately this is a breaking change as people might use the ARNs form the output section in their code somehow... Still not sure if this means that Serverless will reach v2 soon or if splitting a large service with dozens of function up into multiple separate ones is a better solution for now...
shawnemullen commentedon Dec 16, 2016
This issue is causing problems for me as well. I do not like the idea of "splitting up a large service into multiples" because I don't want multiple APIs for one logical service.
I am not sure what problem is being solved by placing a limit in the first place. V1.2 doesn't seem to have an issue.
3 remaining items
shawnemullen commentedon Dec 31, 2016
After looking at this problem a little closer, i don't see this as a CloudFormation problem. Yes, there is a max of 60 aloud, but it looks as though serverless declares outputs for nearly everything in the template. I think a better solution would be to allow the developer to declare what the outputs should be. Maybe a simple flag in the function definition?
There isn't a lot of documentation on the severless web site regarding the Resources section so maybe this is already possible.
shawnemullen commentedon Dec 31, 2016
BTW, I tried using the plugin mentioned above, but it adds over 10MB to my upload file. Maybe I am doing something wrong.
pmuens commentedon Jan 3, 2017
Just a quick update on this one.
@ryansb was kind enough to PR a functionality where one can specify if the Lambda functions should be versioned (See the linked PR #3042) above. 👍
pmuens commentedon Jan 20, 2017
Hey everyone! Here's a quick update:
We've just merged @ryansb PR #3042 so that you can now opt out of function versioning.
Furthermore we've PRed a changed so that function arns are no longer added as
Outputsand will be computed on the fly when running theinfocommand: #3125This way the
Outputssize should be reduced dramatically.pmuens commentedon Jan 24, 2017
Both, #3042 and #3125 are not merged.
Closing this issue since the next Serverless release (v1.6) which is just around the corner will include those merged PRs. Feel free to comment if this is still a problem (after updating to v1.6) and we'll reopen.
manishjha1991 commentedon Feb 3, 2018
this package works perfect for me
https://github.com/jagdish-176/serverless-nested-stack