This will start the service on port 8282. Next, modify your SES client to use the local service.
import { SESClient, SendEmailCommand } from "@aws-sdk/client-ses"; const client = new SESClient({ region: credentials.region, credentials: { accessKeyId: credentials.accessKeyId, secretAccessKey: credentials.secretAccessKey, }, endpoint: "http://localhost:8282", // <--- Add this to trap emails locally }); // Send emails as usual const command = new SendEmailCommand({/*...*/}); const result = await sesClient.send(command); logInfo(`Email sent to ${toAddress} with message ID ${result.MessageId}`);