aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

GetTemplate API does not support non-ASCII characters

Open
#1,220 5 comments 49 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

Other

### Resource Name

CloudFormation GetTemplate API

### Issue Description

When the GetTemplate API is executed against a stack of templates containing non-ASCII characters, such as Japanese characters, the non-ASCII characters in the template are converted to question marks.

This makes it impossible to properly understand the contents of the template after deployment, and also makes it impossible for tools such as AWS CDK to properly display the diff of the template.
https://github.com/aws/aws-cdk/issues/10523

This is a big problem for non-English speakers, who often include native language descriptions and logs in their templates. This is also expected to be a problem for English speakers when specifying emojis.

### Expected Behavior

## Given
Deployed as `SampleStack`

```yaml
Resources:
MySNS:
Type: AWS::SNS::Topic
Properties:
DisplayName: Helloこんにちは☺
```

## When
```
$ aws cloudformation get-template --stack-name SampleStack
```

## Expected
```json
{
"TemplateBody": "Resources:\r\n MySNS:\r\n Type: AWS::SNS::Topic\r\n Properties: \r\n DisplayName: Helloこんにちは☺\r\n",
"StagesAvailable": [
"Original",
"Processed"
]
}
```

### Observed Behavior

## Actual
```json
{
"TemplateBody": "Resources:\r\n MySNS:\r\n Type: AWS::SNS::Topic\r\n Properties: \r\n DisplayName: Hello??????\r\n",
"StagesAvailable": [
"Original",
"Processed"
]
}
```

### Test Cases

Deploy a CloudFormation template that contains non-ASCII characters and call the GetTemplate API to see if the same content is returned as the template.

### Other Details
- Resources created by CloudFormation correctly handle non-ASCII characters.
- a CDK issue blocked by this bug
- https://github.com/aws/aws-cdk/issues/10523
- https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/814

Contributor guide

Open the contributing guide

Research direction

Start by deploying the YAML example as SampleStack and running `aws cloudformation get-template --stack-name SampleStack`. Compare the returned TemplateBody with the deployed template, including Japanese characters and the emoji. Done means GetTemplate preserves the original non-ASCII characters for the relevant template stages; the linked AWS CDK issue provides additional context.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
api, cloud
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.