aws-lambda-ses-forwarder
aws-lambda-ses-forwarder copied to clipboard
Forward different domains to different buckets
Can we do that?
E.g. messages sent to [email protected] were saved to bucket domain1
and messages sent to [email protected] were saved to domain2
.
This request is currently not about this tool. If you want read messages from different bucket, create two different Lambda functions.
Just thought it's purely a configuration issue, because bucket is specified in default config and so it should be possible to forward messages as well. It would be handy to store different messages in corresponding buckets.
Still no possibility?
We have bucket in config:
var defaultConfig = {
fromEmail: "[email protected]",
emailBucket: "buckbuck",
Can we make it conditional?
You could possibly make a custom index.js to put into your lambda that pulls in the ses-forwarder via require
and in your exports.handler add code that examines the function(event, context, callback)
contents to determine the source of the event and then conditionally select a config from a list to pass to the LambdaForwarder.handler.
https://github.com/arithmetric/aws-lambda-ses-forwarder/blob/master/example/index.js