当我没有使用 AWS SES 时,下面的代码运行良好
const AWS = require('aws-sdk');
AWS.config.update({region: 'ap-northeast-2'});
const s3 = new AWS.S3({apiVersion: '2006-03-01'});
但是在我使用 ap-southeast-2 端点(悉尼)添加 SES 代码后,突然无法使用凭据,其范围应限定在有效区域,而不是“ap-northeast-2”错误消息
const ses = new AWS.SES({
apiVersion: '2010-12-01',
endpoint: 'https://email.ap-southeast-2.amazonaws.com'
});
有什么解决办法吗?我需要一些帮助
最佳答案
我在构造ses对象时添加了region字段 它工作完美。
const ses = new AWS.SES({
region: 'ap-southeast-2'
});
关于javascript - 凭证的范围应限定在有效区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58637473/