0
votes

enter image description here I am trying to use template configuration with aws cloudformation (using aws codepipeline). The idea is to use different configuration file for same SAM template for different stack or change set (test or prod stack). I did all the configuration like

 Template* build-output::ciSamTemplate.yml
 Template configuration build-output::ciDevTagConfig.json

But I am getting error "Template configuration is not valid". My template configuration file has below minimal configuration.

{
  "Parameters" : {
    "env" : "dev",
    "apiStage" : "tagDev"
  },
  "StackPolicy" : {
    "Statement" : [
      {
        "Effect" : "Allow",
        "NotAction" : "Update:Delete",
        "Principal": "*",
        "Resource" : "*"
      }
    ]
  }
}

I am not sure what is causing this template configuration file to fail? I don't know how can i debug this ?

3
Got the same problem, checked the cloudwatch logs to see if there was anything there, also made sure to give plenty of permissions to cloudformation for creating the resources. But "the computer says no"... - Hans Peter Hagblom

3 Answers

2
votes

I am a bit late, but maybe it helps someone in the future.

I had the same issue and had to change my Template Configuration file's encoding from UTF-8 BOM to just normal UTF-8 and that did the trick for me.

2
votes

I had this error because the codepipeline configuration file uses a different format to the standard cloudformation parameters file. See this gist -> https://gist.github.com/g-a-d/4bc7f716bc57e42b64e1ef450be9bae8

-1
votes

I got this error because my json for the template configuration was invalid