Skip to content

validate-template fails to identify AWS::CloudFormation::Stack Properties TemplateBody as invalid #9029

@sparr

Description

@sparr

Describe the bug

The following template validates successfully, but then fails during create-stack due to Encountered unsupported property TemplateBody. Other more-obviously-invalid property names like foo produce expected validation failures.

Expected Behavior

Validation failure

Current Behavior

Successful validation

Reproduction Steps

aws cloudformation validate-template --template-body file://thefollowingfile.yaml

AWSTemplateFormatVersion: '2010-09-09'
Resources:
  TestStack:
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateBody:
        AWSTemplateFormatVersion: '2010-09-09'

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/2.14.4

Environment details (OS name and version, etc.)

Python/3.11.6 Darwin/23.1.0 MacOS/14.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.cloudformationp2This is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions