I am trying to use the CloudFormation Template Step to create a stack in AWS. I have done this before so it is not a permission/configuration issue.
The issue I run into is that when I deploy I get the following error:
Amazon.CloudFormation.AmazonCloudFormationException: The service returned an error with Error Code ValidationError and HTTP Body:
Sender ValidationError
1 validation error detected: Value 'AWSTemplateFormatVersion: ‘2010-09-09’…
Default: —> Amazon.Runtime.Internal.HttpErrorResponseException: The remote server returned an error: (400) Bad Request. —> System.Net.WebException: The remote server returned an error: (400) Bad Request.
If I run the exact same template and parameters directly from the AWS Console it works. So I am 99% sure the template itself is fine.
I’m stuck trying to figure out what is wrong. In my head I’m down to either the Yaml file is too long OR there is some sort of special character in the file that is throwing it off.
Is there a length limit I should be aware of? Are there any special characters that can’t be used?
Is there something else I’m missing?
I’m currently running into an error importing your json file that might be the source of the “Bad Request” error. Although, I’m thinking this should have shown up when you verified the template directory in the AWS console.
Error: Parameter names ‘Region’, ‘AWS Account’, ‘Dynamo Table Name’, ‘Dynamo Key Json’, ‘Dynamo update Expression’, ‘Dynamo Expression Attribute Values’ are already in use by other Parameters in this step template. Parameter names must be unique.
I’m checking with our engineering team this evening, as they’re in Australia, to see if this validation error could be related or if it’s just a red herring.
Hi -
I’m still not sure what you are asking me to do.
But here is what I have just done and I’m getting the same results.
I took the updated template and created a new step template. I then created coorespoding parameters for that step template matching the Templates parameters. Each variable is unique and starts with an s_
I then took my existing process that works using the old template and added the new step template updated/used the new variables and ran it.
I am getting the same results. When it fails, it is not even creating a stack in AWS it fails before it gets there.
Hi @cqueenan,
Sorry for the delay in getting back to you. I can see why this doesn’t make sense to you. The error I was seeing is most certainly a red herring. My apologies for the misdirection.
I’m not 100% confident that this is your issue since you can successfully run the template in the AWS console, but do think it’s something to rule out.
If this is the case, you may want to try creating multiple steps out of your Template to keep the request under the limit.
Once again, I’m very sorry for the misdirection. Let me know what you find.
Hi @cqueenan,
Unfortunately, there is not an easy way to see this information in Octopus. Running the request through a tool like Fiddler should give you the request size.
I’m unaware of a way to pull the entire command including template and variables. I’m reaching out to my teammates to see if someone else knows how this can be done. In the meantime, you may want to test the step with a simplified version of the template.