-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SES: Email template unicode support is broken #33285
Comments
Reproducible locally where Resources
[~] AWS::SES::Template UnicodeTestTemplate UnicodeTestTemplate may be replaced
└─ [~] Template (may cause replacement)
├─ [~] .HtmlPart:
│ ├─ [-] Unicode ? char.
│ └─ [+] Unicode ® char.
├─ [~] .SubjectPart:
│ ├─ [-] Unicode ? char.
│ └─ [+] Unicode ® char
└─ [~] .TextPart:
├─ [-] Unicode ? char.
└─ [+] Unicode ® char.
✨ Number of stacks with differences: 1 Manually updating the template in AWS CloudFormation console (upload from Notice that in CloudFormation, it displays Using AWS CLI:
If we examine the template in AWS CloudFormation console, below are the contents: {
"Resources": {
"UnicodeTestTemplate": {
"Type": "AWS::SES::Template",
"Properties": {
"Template": {
"HtmlPart": "Unicode ? char.",
"SubjectPart": "Unicode ? char",
"TemplateName": "UnicodeTestTemplate",
"TextPart": "Unicode ? char."
}
},
"Metadata": {
"aws:cdk:path": "CdktestStack/UnicodeTestTemplate"
}
},
"CDKMetadata": {
"Type": "AWS::CDK::Metadata",
"Properties": {
"Analytics": "v2:deflate64:H4sIAAAAAAAA/yXFSw5AMBAA0LN03w4VSe3dAHupGknpRzqlC3F3C2/zGpBKQc10IWHWQzi7wDNmbQ6uC82EBP0WJvSn0xl5v4UBKV7J4MtDXBF2qm7ZQVNDy3ayVqQrZOsRhv8PvGWMX2EAAAA="
},
"Metadata": {
"aws:cdk:path": "CdktestStack/CDKMetadata/Default"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
} Examining SES template
So looks like correct SES email template is being deployed via CDK/CloudFormation, but CloudFormation is not displaying or returning Unicode characters properly. Unsure how CDK could handle this scenario when CloudFormation API is not handling properly. |
I can reproduce the same as @ashishdhingra. Can confirm that CDK synthesizes the correct template with ® and it is uploaded to s3 correctly. Beyond that, it's CloudFormation that takes the template from s3 as input, and it must not be converting unicode characters correctly. I will open up an internal ticket with them |
Describe the bug
I run into the issue on using CDK import of
aws_ses.CfnTemplate
resource. Imported email templates into a CDK stack I've started to get errors on each followingcdk import
run reporting that email templates has been modified and cdk cannot do import on modified stacks.Meanwhile not CDK diff nor drift detection report any difference.
I've tried to perform a modification in a template and got that little modification will rewrite all the fields in the template. Also server side template is looking like all unicode characters was replaced with question marks (
?
).Removing all unicode symbols from email template fixes the issue.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Current Behavior
Reproduction Steps
The result is good and diff is empty after deploy.
subjectPart
.cdk diff
(I've also triedcdk diff --strict
, result is the same) and look at the result.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.177.0
Framework Version
No response
Node.js Version
22.13.1
OS
Arch Linux
Language
TypeScript
Language Version
5.6.3
Other information
No response
The text was updated successfully, but these errors were encountered: