2

When I didn't use AWS SES, below code was working perfectly

const AWS = require('aws-sdk');
AWS.config.update({region: 'ap-northeast-2'});
const s3 = new AWS.S3({apiVersion: '2006-03-01'});

but after I added SES code with ap-southeast-2 endpoint(Sydney), suddenly not working with Credentials should be scoped to a valid region, not 'ap-northeast-2' error message

const ses = new AWS.SES({
  apiVersion: '2010-12-01',
  endpoint: 'https://email.ap-southeast-2.amazonaws.com'
});

Is there any solution? please I need some helps

1 Answers1

2

I added region field when constructiong ses object it works perfectly.

const ses = new AWS.SES({
  region: 'ap-southeast-2'
});