Guide
How to edit Amazon SES email templates.
Last updated 11 November 2026
Editing a stored SES template means reading its content, changing it, and writing all of it back. Here’s how to do that safely from the command line or in code, and how to do it visually.
Skip the JSON
Connect your AWS account, edit your existing SES templates in the browser, and publish the changes.
Open the editorYour options
| Method | Good for | Watch out for |
|---|---|---|
| AWS CLI | One-off fixes and scripts | JSON escaping and overwrites |
| SDK | Editing templates from your own tooling | You build any safeguards yourself |
| Visual editor | Regular changes, and people who don’t use the CLI | Needs access to your SES templates |
AWS documents these steps in Managing email templates, and creating templates in its SES templates guide. Both use the API and CLI, which are the routes this guide follows. Need a new template instead? See how to create an SES template.
Edit with the AWS CLI
You’ll need the AWS CLI, jq, and permission to read and update SES templates. Templates belong to one AWS Region, so use the Region the template is in.
1. Find the template
aws sesv2 list-email-templates --region us-east-12. Download its content
get-email-template returns the Subject, Text, and Html parts. Keep content.json as your backup.
aws sesv2 get-email-template \
--template-name welcome \
--query TemplateContent > content.json
# Pull the HTML into its own file so you can edit it normally
jq -r .Html content.json > welcome.html3. Make your change and upload it
Edit welcome.html in any editor, then run update-email-template. Change Text too if the wording changed, so both versions match.
# Put the edited HTML back. jq handles the JSON escaping.
jq --rawfile html welcome.html '.Html = $html' content.json > updated.json
aws sesv2 update-email-template \
--template-name welcome \
--template-content file://updated.json4. Test it
Render the template with realistic data. Try it with optional fields left out and with empty lists as well. More in how to test SES templates.
aws sesv2 test-render-email-template \
--template-name welcome \
--template-data '{"firstName":"Ada"}'Edit with an SDK
The steps are the same: read the content, change it, and send it back. Node.js:
import { SESv2Client, GetEmailTemplateCommand, UpdateEmailTemplateCommand } from '@aws-sdk/client-sesv2';
const ses = new SESv2Client({ region: 'us-east-1' });
const name = 'welcome';
const { TemplateContent } = await ses.send(new GetEmailTemplateCommand({ TemplateName: name }));
await ses.send(new UpdateEmailTemplateCommand({
TemplateName: name,
TemplateContent: { ...TemplateContent, Subject: 'Welcome aboard, {{firstName}}' },
}));Python:
import boto3
ses = boto3.client('sesv2', region_name='us-east-1')
name = 'welcome'
content = ses.get_email_template(TemplateName=name)['TemplateContent']
content['Subject'] = 'Welcome aboard, {{firstName}}'
ses.update_email_template(TemplateName=name, TemplateContent=content)Common pitfalls
- Sending only the part you changed. AWS says any lines you omit are removed from the template (Managing email templates). Always send
Subject,Html, andTexttogether, even to change one of them. - No way back.
get-email-templatereturns only the current content. Save a copy before every update. - Hand-editing escaped HTML. One stray quote or line break makes the JSON invalid. Edit the HTML as a file and let a tool such as
jqencode it. - Overwriting someone else’s change. SES accepts the update whatever changed since you downloaded it. Download right before you edit.
- Editing production directly. Later sends use the new version, with no draft stage. Test under a separate template name or in another account first.
- Breaking Handlebars. A template can save and still fail when SES renders it. Test it, and publish Rendering Failure events through a configuration set. See SES template rendering failures and the SES Handlebars reference.
- Updating too fast. The CLI reference limits
update-email-templateto once per second, so pause between updates in a script.
Edit visually
Huskar Templates is a visual SES template editor. When you connect an AWS account through an IAM role, the templates already in that account and Region are copied into your workspace once, as code templates, with a live preview. From there:
- Edit the HTML, or switch to the visual editor. A template is converted to blocks once, and the HTML stays saved.
- Preview it with sample data in Gmail, Apple Mail, and Outlook frames.
- Publish the change to SES. If someone edited the template outside Huskar since your last publish, you get a warning before overwriting it.
- Preview, compare, restore, or publish an older version from version history.
See the SES template manager page for how this works across accounts and teams, and the SES template API and CLI reference for every command in one place.
FAQ
How do I edit an Amazon SES email template?
Download the current content with get-email-template, change it, and send all of it back with update-email-template. Then check it with test-render-email-template. A visual editor such as Huskar Templates does the same job without handling the JSON yourself.
Can I undo an edit to an SES template?
Only if you kept a copy. GetEmailTemplate returns the template’s current name, content, and tags, with no earlier versions. Save the old content before you update, or use a tool or repository that keeps history.
Does editing a template change emails that were already sent?
No. A template is applied when SES renders a message. Emails already sent stay as they were, and later sends use the updated template.
How fast can I update many SES templates?
The AWS CLI reference says you can run UpdateEmailTemplate no more than once per second, and GetEmailTemplate no more than 50 times per second. Pause between updates in any script.
Can I change only the subject of an SES template?
Not on its own. AWS’s guide to managing templates says any lines you omit are removed from the template, so to change only the subject you still send the text and HTML parts with it.
Can I rename an SES template?
UpdateEmailTemplate takes the template name and new content, and has no field for a new name. To use a different name, create a template with that name from the same content, point your sends at it, and delete the old one.