I tried to create an AWS CloudFormation stack, but it failed with one of the following error messages:

  • "JSON not well-formed"
  • "YAML not well-formed"
  • "Unresolved resource dependencies [XXXXXXXX] in the Resources block of the template"
  • "The [environmental resource] 'XXXXXXXX' does not exist"
  • "Invalid template property or properties [XXXXXXXX]"
  • "Unrecognized parameter type: XXXXXXXX"
  • "Invalid template parameter property 'XXXXXXXX'"
  • "Encountered unsupported property XXXXXXXX"
  • "Value of property XXXXXXXX must be of type String"

These errors result from improper JSON or YAML formatting, resource definitions, or references to resources in the template.

When troubleshooting, make sure the following things are true:

1. The template follows proper JSON or YAML syntax. Consider using command line-based tools, like the AWS CLI CloudFormation template validator, browser-based tools like http://jsonlint.com/, or text editor-based tools like Atom's linter-jsonlint package to help you check your JSON syntax. Consider using the browser based tools YAML Lint or Online YAML Parser to help you check your YAML syntax.

2. Resource logical IDs exist or are defined in your template, or physical IDs of resources in your environment exist. Incorrectly defined IDs will result in these kinds of errors. For example, in the following example, "test" is referenced for the ImageId property, but there is no resource logical ID or parameter named "test" in the template:

Note: AWS CloudFormation templates are stored as text files whose format complies with the JSON or YAML standard. The following example lists the same template saved using both formats. For more information about YAML support, see Learn Template Basics, AWS CloudFormation Update – YAML, Cross-Stack References, Simplified Substitution, and YAML Version 1.2.

{

"Parameters" : {},

    "Resources" : {

        "EC2Instance01" : {

            "Type" : "AWS::EC2::Instance",

            "Properties" : {

                "ImageId" : {"Ref": "test"},

                …

            }

        }

    }

}

Parameters:

    Resources:

        EC2Instance01:

            Type: AWS::EC2::Instance

            Properties:

                ImageID:

                    Ref: test

                     …

This results in a "Unresolved resource dependencies [test] in the Resources block of the template” error. For more information on resource definitions and their syntax, see Resources.

3. Template sections and resource definitions use valid properties, values, and value types. Incorrectly defined properties or value types result in errors. For information about resource-specific properties, see Resource Property Types Reference.

CloudFormation stack, template, validation, format, error, property, type, value, unresolved resource dependencies, unsupported, invalid, YAML, JSON


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center.

Published: 2015-08-28

Updated: 2016-10-20