aws-ses
Node.js library used to interact with AWS SES.
It provides a wrapper around the SDK to make it easier to construct the required payloads.
Usage
const library = require('@advisorycloud/aws-ses').SES
const SES = new library()
const handler = async () => {
await SES.sendEmail({
to: 'test@example.com',
from: 'test@example.com',
subject: 'test subject',
bodyText: 'body text'
})
}
module.exports = {
handler
}
Available Wrappers
Development
See CONTRIBUTING.md
There is a ./forDevelopment.js script that can be used to run the library code from CLI. Instructions on how to do so are located within the file.
Architecture
The index.js file is the main interface to this library, exposing methods such as sendEmail()
which map to the underlying SDK.
The methods/* files are the individual wrappers of each SDK method.
Because class constructors cannot be set as async
you cannot perform all method calls via the constructor
but instead have to provide a separate method for each mapped method.