You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为何AWS SES的create-custom-verification-email-template返回BadRequestException?

AWS SESv2创建自定义验证邮件模板时无详情BadRequestException的排查方案

问题重现

执行以下CLI命令创建自定义验证邮件模板:

aws sesv2 create-custom-verification-email-template --cli-input-json file://template.json --profile my-profile --region us-west-2

返回仅含错误类型但无具体说明的响应:

An error occurred (BadRequestException) when calling the CreateCustomVerificationEmailTemplate operation:

排查与解决步骤

这种无详情的BadRequestException通常由格式、权限或资源限制问题导致,可按以下方向逐一排查:

  • 校验JSON模板完整性:确认template.json包含所有必填字段:TemplateName、FromEmailAddress、TemplateSubject、TemplateContent、SuccessRedirectionURL、FailureRedirectionURL,且字段值符合规范(比如邮箱格式合法、URL有效)。
  • 验证IAM权限:检查my-profile对应的IAM用户是否拥有ses:CreateCustomVerificationEmailTemplate权限,且权限策略无区域限制。
  • 检查资源配额:SESv2自定义验证邮件模板默认配额为10个,确认当前区域的模板数量未达上限。
  • 开启调试日志:添加--debug参数重新执行命令,查看完整的API交互日志,直接定位具体错误原因:
aws sesv2 create-custom-verification-email-template --cli-input-json file://template.json --profile my-profile --region us-west-2 --debug

内容的提问来源于stack exchange,提问作者rinogo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 02:37:07