Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example event from SNS when posting to Lambda
{
"Records": [
{
"EventSource": "aws:sns",
"EventVersion": "1.0",
"EventSubscriptionArn": "arn:aws:sns:us-east-1:123412341234:LambdaTesting:12b6a0a7-bbbb-ffff-cccc-7a7d21e25123",
"Sns": {
"Type": "Notification",
"MessageId": "614a0b34-bbbb-ffff-cccc-58ffddd9745f",
"TopicArn": "arn:aws:sns:us-east-1:123412341234:LambdaTesting",
"Subject": null,
"Message": "{\"notificationType\":\"Delivery\",\"mail\":{\"timestamp\":\"2018-08-15T19:48:12.548Z\",\"source\":\"me@example.com\",\"sourceArn\":\"arn:aws:ses:us-east-1:123412341234:identity/me@example.com\",\"sourceIp\":\"173.226.68.90\",\"sendingAccountId\":\"123412341234\",\"messageId\":\"010001653f219e84-9157e793-51e8-4b06-b20b-c5eae86a8a93-000000\",\"destination\":[\"success@simulator.amazonses.com\"],\"headersTruncated\":false,\"headers\":[{\"name\":\"From\",\"value\":\"me@example.com\"},{\"name\":\"Reply-To\",\"value\":\"me@example.com\"},{\"name\":\"To\",\"value\":\"success@simulator.amazonses.com\"},{\"name\":\"Subject\",\"value\":\"Testing\"},{\"name\":\"MIME-Version\",\"value\":\"1.0\"},{\"name\":\"Content-Type\",\"value\":\"multipart/alternative; boundary=\\\"----=_Part_2092289_983900011.1534362492550\\\"\"}],\"commonHeaders\":{\"from\":[\"me@example.com\"],\"replyTo\":[\"me@example.com\"],\"to\":[\"success@simulator.amazonses.com\"],\"subject\":\"Testing\"}},\"delivery\":{\"timestamp\":\"2018-08-15T19:48:12.846Z\",\"processingTimeMillis\":298,\"recipients\":[\"success@simulator.amazonses.com\"],\"smtpResponse\":\"250 2.6.0 Message received\",\"remoteMtaIp\":\"72.21.215.231\",\"reportingMTA\":\"a9-75.smtp-out.amazonses.com\"}}",
"Timestamp": "2018-08-15T19:48:12.966Z",
"SignatureVersion": "1",
"Signature": "1234tFKb9qKWkeuIFK8LRZZLltw51234piNwEn2lOra4TNXRga4eW7t1BK3dcnUafORtG05kDLi1N7ND3vtE8E/TpVX4wyuFbmM+KCAjCa+f26RHMmwlt4ey2CAoduhtE6RkNKNMdlB+6LYN//px+DgH67qdqdISLjhntRx12349mTeuRvjXPmcmpqyu69uXzQJQcivMggxkzAuYKHerjb7dD1v2164QgQhHjNaeR50SeFeaJuX4Fjp3x12UKTTczxoqdUBz2vkpGXkRZDi91234AeW6T269Cjlsfk8VfyyL5kXC2Puy7RIC8fZT+1T4DL5550jqAlCr4WE1234kBg==",
"SigningCertUrl": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-eaea6120e66ea12e88dcd8bcbddca752.pem",
"UnsubscribeUrl": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:123412341234:LambdaTesting:12b6a0a7-bbbb-ffff-cccc-7a7d21e25123",
"MessageAttributes": {}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment