UPDATE: For those coming across this issue, this applies to all AWS::SES::* resources across multiple regions
When uploading a template with an AWS::SES::Template resource in Sydney region, the following error is given:
Template format error: Unrecognized resource types: [AWS::SES::Template]
Categories: "other AWS services", "bug?"
Not a bug, but a lagging deployment. We need to update our coverage to include the recent SES regions. That includes most of the types for the AWS::SES namespace (with the exception of AWS::SES::ConfigurationSet which is using the new Registry + CLI modelling). We are likely to migrate the other types to the new model before extending regional support. So, keep an eye on this repository.
Is there any workaround for this?
Just an FYI - I had a template in AWS that I'd deployed which had a condition, if ap-southeast-2 do not deploy the AWS::SES::Template Resource.
This worked when I deployed it, but then I went to update it (using aws cloudformation deploy), and got this error (even though the condition was still false):
An error occurred (ValidationError) when calling the GetTemplateSummary
operation: Template format error: Unrecognized resource types: [AWS::SES::Template]
I could no longer update the template, and it was stuck.
The resolution was to run the template via aws cloudformation create-change-set
And then apply the changeset with aws cloudformation execute-change-set
I was then able to update the template.
Is there any update on this? I just ran into the same issue. SES had new regions added quite a few months ago now.
Any update on this? I'm hitting this error on ap-southeast-2
If it helps anyone, my workaround for this is a CloudFormation custom resource that manually creates/updates/deletes the template in SES. The custom resource takes a "Template" parameter and passes it to the createTemplate method of the SES class (from aws-sdk). Working perfectly for our use case but it's still only a workaround
Hitting this error on eu-north-1.
And in eu-west-2
Had to do the custom resource thing today for SES templates. Here's a sample for anyone looking:
Resources:
LambdaServiceRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action:
- sts:AssumeRole
Path: /
Policies:
- PolicyName: root
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- xray:PutTraceSegments
- xray:PutTelemetryRecords
Resource: '*'
- Effect: Allow
Action:
- ses:CreateTemplate
- ses:GetTemplate
- ses:UpdateTemplate
- ses:DeleteTemplate
Resource: "*"
CustomResourceLambdaFunction:
Type: AWS::Lambda::Function
Properties:
Handler: index.handler
Role: !GetAtt LambdaServiceRole.Arn
Code:
ZipFile: |
import boto3
import os
import json
import cfnresponse
import pprint
def handler(event, context):
responseData = {}
try:
client = boto3.client('ses')
if event['RequestType'] == "Create":
pprint.pprint(client.create_template(
Template={
'TemplateName': event['ResourceProperties']['TemplateName'],
'SubjectPart': event['ResourceProperties']['SubjectPart'],
'TextPart': event['ResourceProperties']['TextPart'],
'HtmlPart': event['ResourceProperties']['HtmlPart']
}
))
elif event['RequestType'] == "Update":
pprint.pprint(client.update_template(
Template={
'TemplateName': event['ResourceProperties']['TemplateName'],
'SubjectPart': event['ResourceProperties']['SubjectPart'],
'TextPart': event['ResourceProperties']['TextPart'],
'HtmlPart': event['ResourceProperties']['HtmlPart']
}
))
elif event['RequestType'] == "Delete":
pprint.pprint(client.delete_template(
TemplateName=event['ResourceProperties']['TemplateName']
))
cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData, "GenericPhysicalResourceId")
except:
cfnresponse.send(event, context, cfnresponse.FAILED, responseData, "GenericPhysicalResourceId")
Runtime: python3.7
Timeout: 30
WelcomeTemplate:
Type: Custom::Template
Properties:
ServiceToken: !GetAtt CustomResourceLambdaFunction.Arn
TemplateName: "welcome"
SubjectPart: "Welcome to the application!"
TextPart: |
Hey {{firstname}},
Welcome to the application.
- The Team
HtmlPart: |
Hey {{firstname}},<br /><br />
Welcome to the application.<br /><br />
- The Team
Same here... eu-central-1
Request you to take this up on priority, Not able to create these in Canada Frankfurt and Sydney Region
Is there an ETA on this? This causes a major headache in our deployment and the "workarounds" are ugly.
Lazy workaround:
https://gist.github.com/Hikaon/574577e1985689e5430b95148951b557
And in ap-south-1
Currently still unavailable for ca-central-1
This is still an issue in eu-west-2
still on eu-west-2, that's pretty poor
this ticket has been open for a year and a half now, and we'd love an update on some ETAs please. Either regarding the new registry + cli modelling migration for this, or for regional support for the existing model. Where is this on the CFN team's priority list, please? SES is a very important need
@rjlohan @PatMyron Any update on the deployment lag? Could we get the docs updated to mention the current issues across regions, so that failures don't crop up unexpectedly for others? (This will appear to users as a pretty serious bug without that documentation)
Thank you. To be honest, this is a serious bug even with the documentation. All the documentation will do is a "cover our ass" thing, whereas the frustration in this entire ticket is that the deployment is lagging and there's little indication that the SES/CloudFormation effort is moving.
So, respectfully, rather than writing documentation to tell us which regions are supported, please just support all the regions.
Most helpful comment
this ticket has been open for a year and a half now, and we'd love an update on some ETAs please. Either regarding the new registry + cli modelling migration for this, or for regional support for the existing model. Where is this on the CFN team's priority list, please? SES is a very important need