Skip to content

Instantly share code, notes, and snippets.

@purdy
Created August 15, 2018 20:01
Show Gist options
  • Select an option

  • Save purdy/8a8f6986a7b8fb427e1591e29ca22ec4 to your computer and use it in GitHub Desktop.

Select an option

Save purdy/8a8f6986a7b8fb427e1591e29ca22ec4 to your computer and use it in GitHub Desktop.
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\":\"[email protected]\",\"sourceArn\":\"arn:aws:ses:us-east-1:123412341234:identity/[email protected]\",\"sourceIp\":\"173.226.68.90\",\"sendingAccountId\":\"123412341234\",\"messageId\":\"010001653f219e84-9157e793-51e8-4b06-b20b-c5eae86a8a93-000000\",\"destination\":[\"[email protected]\"],\"headersTruncated\":false,\"headers\":[{\"name\":\"From\",\"value\":\"[email protected]\"},{\"name\":\"Reply-To\",\"value\":\"[email protected]\"},{\"name\":\"To\",\"value\":\"[email protected]\"},{\"name\":\"Subject\",\"value\":\"Testing\"},{\"name\":\"MIME-Version\",\"value\":\"1.0\"},{\"name\":\"Content-Type\",\"value\":\"multipart/alternative; boundary=\\\"----=_Part_2092289_983900011.1534362492550\\\"\"}],\"commonHeaders\":{\"from\":[\"[email protected]\"],\"replyTo\":[\"[email protected]\"],\"to\":[\"[email protected]\"],\"subject\":\"Testing\"}},\"delivery\":{\"timestamp\":\"2018-08-15T19:48:12.846Z\",\"processingTimeMillis\":298,\"recipients\":[\"[email protected]\"],\"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