AWS 策略错误 — 资源数量大于允许的最大值:但我只有 77 个资源

时间:2021-07-26 10:23:32

标签: amazon-web-services amazon-cloudformation serverless

我收到此错误

 Serverless Error ----------------------------------------
 
  The CloudFormation template is invalid: Template format error: Number of resources, 507, is greater than maximum allowed, 500

但这里的问题是我的无服务器 yml 中只定义了 77 个服务。出现此错误的其他可能性是什么?

1 个答案:

答案 0 :(得分:1)

如果您使用的是框架(例如无服务器或 AWS SAM),则模板中的一个资源可能会扩展为生成的 cloudformation 模板中的多个资源。这可能就是这里发生的事情。一个潜在的解决方案是使用 nested stacks