An example of writing AWS Lambda function in Golang (through the Node shell), and sending emails via SES.
- Clone this repo.
glide install && make build
- Upload lambda.zip to create a new Lambda function.
- Deploy the API Gateway.
- Make sure all privilege/CORS/policy settings are good.
- Call the API with request in the form of:
{
"from": "<from@mail.address>",
"to": "<to@mail.address>",
"subject": "The interesting subject",
"body": "..."
}
The idea of shelling out Golang program comes from rjocoleman/lambda-ses.