问题描述
今天突然发现这个
error Error [ConfigError]: Missing region in config
我昨天没有收到。该地区就在那里,它是正确的。我收到此错误还有其他原因吗?
var AWS = require('aws-sdk');
AWS.config.update({
secretAccessKey: process.env.AWSSECRETKEY,accessKeyId: process.env.AWSACCESSKEY,region: process.env.AWSREGION,});
// update Template parameters
var params = {
Template: {
TemplateName: 'Email_Registration_Verification',HtmlPart: `test`,SubjectPart: 'Verify your Email',TextPart: `<h1>Test</h1>`,},};
var templatePromise = new AWS.SES({
apiVersion: '2010-12-01',})
.updateTemplate(params)
.promise();
templatePromise
.then(function (data) {
console.log('Template Updated');
})
.catch(function (err) {
console.error(err,err.stack);
});
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)