SESのBounceはSNSで受け取ることが可能となりますので、SNSをトリガーとしてLambdaに処理させることが可能です。 以下の例ではSimpleDBとなりますが、DynamoDBやRDSでもOK。
process.env.TZ="Asia/Tokyo"; var aws = require('aws-sdk'); var sdb = new aws.SimpleDB({apiVersion: '2009-04-15', region: 'ap-northeast-1'}); exports.handler = function(event, context) { var message = event.Records[0].Sns.Message; console.log(message); var json = JSON.parse(message); var bounceType = json.bounce.bounceType; var bounceSubType = json.bounce.bounceSubType; var email = json.bounce.bouncedRecipients[0].emailAddress; console.log("bounceType:" + bounceType); console.log("bounceSubType:" + bounceSubType); console.log("email:" + email); if ("Permanent" == bounceType) { var params = { Attributes: [ { Name: 'type', Value: 'lambda', Replace: true }, ], DomainName: 'suppressed', ItemName: email }; sdb.putAttributes(params, function(err, data) { if (err) { console.log(err, err.stack); } else { context.succeed("suppressed:" + email); console.log(data); context.succeed(message); } }); } };