I have just started migrating all my Web APIs to AWS serverless functions using VS2015 dot net core. I have total 60 resources(AWS::Serverless::Function) defined in serverless.template file. When I started uploading it through Visual Studio (Publish to AWS Lamda), I got below error.
Failed to create CloudFormation change set: Template format error: Number of resources, 267, is greater than maximum allowed, 200
I tried deleting some resources but same error comes repeatedly. Initially when I do it by just having 2,3 resources, it was working just fine.
Any help would be highly appreciated.
Edit: Below is new master template referring nested stack
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Transform" : "AWS::Serverless-2016-10-31",
"Resources" : {
"FirstStack" : {
"Type" : "AWS::CloudFormation::Stack",
"Properties" : {
"TemplateURL" : "https://s3-us-west-2.amazonaws.com/serverless1.template",
"TimeoutInMinutes" : "60"
}
},
"SecondStack" : {
"Type" : "AWS::CloudFormation::Stack",
"Properties" : {
"TemplateURL" : "https://s3-us-west-2.amazonaws.com/serverless2.template",
"TimeoutInMinutes" : "60"
}
}
},
"Outputs": {
}
}
If you look at Cloudformation Limits you'll see that 200 Resources is the max per template. Their recommendation is to use Nested Stacks.
AWS Changes Posted On:
AWS Changes Posted At:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With