无法使用 AWS SES API 发送电子邮件。状态代码错误消息:403
Emails could not be sent using AWS SES APIs. Error message with Status Code: 403
“正在尝试使用 Java 的 AWS 开发工具包通过 Amazon SES 发送电子邮件...
电子邮件未发送。
错误消息:请求中包含的安全令牌无效。 (服务:AmazonSimpleEmailService;状态代码:403;错误代码:InvalidClientTokenId;请求 ID:af51a62a-1fdc-11e8-9ae1-d5b4f9a354b8)
上面的语句是Java中编写的示例程序的结果,该示例程序假设使用Amazon SES API 发送电子邮件。
这是我在 Github:AmazonSESSample.
上找到的示例
我已经创建了 AWS 账户。
2 我还获得了我的凭据:API_KEY 和 API_SECRETE
- 我已将凭据放在 user.home
下的 aws 文件夹中
- 我已经设置了我的支出限额,并且我的服务脱离了沙盒环境。
- 我已经设置了我的地区 US_WEST_2
- 简而言之,我已经完成了从文档中得到的所有内容。
403错误的原因是什么我无法解释。
请任何人帮助解决这个问题。
我真的很感激。
SES 不支持使用 IAM 用户访问密钥发送电子邮件。 SES 使用 Amazon SES SMTP 凭据。
Sign in to the AWS Management Console and open the Amazon SES console
at https://console.aws.amazon.com/ses/.
In the navigation pane, choose SMTP Settings.
In the content pane, choose Create My SMTP Credentials.
In the Create User for SMTP dialog box, you will see that an SMTP user
name has been filled in for you. You can accept this suggested user
name or enter a different one. To proceed, choose Create.
Choose Show User SMTP Credentials. Your SMTP credentials will be
displayed on the screen; copy them and store them in a safe place. You
can also choose Download Credentials to download a file that contains
your credentials.
这是一份 link 文档,其中解释了不同类型的凭据以及它们如何与 SES 一起使用。
Using Credentials With Amazon SES
这里是 link 获取凭据的方法:
“正在尝试使用 Java 的 AWS 开发工具包通过 Amazon SES 发送电子邮件... 电子邮件未发送。 错误消息:请求中包含的安全令牌无效。 (服务:AmazonSimpleEmailService;状态代码:403;错误代码:InvalidClientTokenId;请求 ID:af51a62a-1fdc-11e8-9ae1-d5b4f9a354b8)
上面的语句是Java中编写的示例程序的结果,该示例程序假设使用Amazon SES API 发送电子邮件。 这是我在 Github:AmazonSESSample.
上找到的示例我已经创建了 AWS 账户。 2 我还获得了我的凭据:API_KEY 和 API_SECRETE
- 我已将凭据放在 user.home 下的 aws 文件夹中
- 我已经设置了我的支出限额,并且我的服务脱离了沙盒环境。
- 我已经设置了我的地区 US_WEST_2
- 简而言之,我已经完成了从文档中得到的所有内容。 403错误的原因是什么我无法解释。 请任何人帮助解决这个问题。 我真的很感激。
SES 不支持使用 IAM 用户访问密钥发送电子邮件。 SES 使用 Amazon SES SMTP 凭据。
Sign in to the AWS Management Console and open the Amazon SES console at https://console.aws.amazon.com/ses/.
In the navigation pane, choose SMTP Settings.
In the content pane, choose Create My SMTP Credentials.
In the Create User for SMTP dialog box, you will see that an SMTP user name has been filled in for you. You can accept this suggested user name or enter a different one. To proceed, choose Create.
Choose Show User SMTP Credentials. Your SMTP credentials will be displayed on the screen; copy them and store them in a safe place. You can also choose Download Credentials to download a file that contains your credentials.
这是一份 link 文档,其中解释了不同类型的凭据以及它们如何与 SES 一起使用。
Using Credentials With Amazon SES
这里是 link 获取凭据的方法: