aws / aws/aws-cli

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

Open
#9,029 10 comments 2 reactions 1 assignee Claimed by @RyanFitzSimmonsAK View on GitHub
bug cloudformation p2 service-api
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### 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

```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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.