I am deploying a .Net Core Web API project to AWS Lambda. It works, but I have the following issue:
Previous Template Contains Parameter No Longer Used
A previous deployment of our Lambda created a CloudFormation template with a defined Parameter. For discussion, let's call it "BadParameter".
Now, we don't want to use that parameter anymore. We've updated our serverless.template so that it does not have that parameter anymore.
Now, all our deployments (using the update template) fail with the message:
Error creating CloudFormation change set: Parameters: [BadParameter] do not exist in the template
I can fix this by downloading the template from CloudFormation, manually removing the parameter, then re-uploading the template, but that is tedious and error-prone.
Is there some way I can specify in my new template that the old parameter should be deleted?
I ran into this too. I'm going to give details on what I saw and what I did to fix it because my situation doesn't seem to be exactly the same as SouthShoreAK's situation, but is close enough that I'm certain we are experiencing the same issue.
parent-template.yml is a CloudFormation template which is being deployed as part of the CI/CD process. Inside this template are several AWS::CloudFormation::StackSet resources, child-template-1.yml, child-template-2.yml, etc. Each child-template-*.yml StackSet resource is deploying into multiple accounts.
I was receiving this error on one of the AWS::CloudFormation::StackSet resources:
Parameters: [OldParameter1, OldParameter2] do not exist in the template
Recent changes were:
aws cloudformation deployAt that point, the parameters have been removed from the templates. I do not know why this is necessary; it seems like a bug in CloudFormation to me.
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