fix: add missing region config for ses

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-04-17 18:59:13 +03:00
parent 1c1718857e
commit 29e16abc85
4 changed files with 7 additions and 2 deletions
@@ -61,6 +61,10 @@ export interface Config {
* AWS account ID to use
*/
accountId?: string;
/**
* AWS region to use
*/
region?: string;
}
| {
transport: 'sendmail';
@@ -88,6 +88,7 @@ export class NotificationsEmailProcessor implements NotificationProcessor {
credentialsManager: awsCredentialsManager,
apiVersion: transportConfig.getOptionalString('apiVersion'),
accountId: transportConfig.getOptionalString('accountId'),
region: transportConfig.getOptionalString('region'),
});
} else if (transport === 'sendmail') {
this.transporter = createSendmailTransport({
@@ -25,8 +25,7 @@ export const createSesTransport = async (config: SesTransportConfig) => {
{
apiVersion: config.apiVersion ?? '2010-12-01',
credentials: credentials.sdkCredentialProvider,
region: credentials.stsRegion,
accountId: credentials.accountId,
region: config.region,
},
]);
return createTransport({
@@ -55,6 +55,7 @@ export interface SesTransportConfig extends TransportConfig {
*/
apiVersion?: string;
accountId?: string;
region?: string;
credentialsManager: AwsCredentialsManager;
}