(options)
| 90 | } |
| 91 | |
| 92 | function createSNSEvent (options) { |
| 93 | var options = setDefaults(options, "sns"); |
| 94 | options.message = typeof options.message === "string" ? options.message : JSON.stringify(options.message); |
| 95 | |
| 96 | return { |
| 97 | "Records": [ |
| 98 | { |
| 99 | "EventVersion": "1.0", |
| 100 | "EventSubscriptionArn": "arn:aws:sns:EXAMPLE", |
| 101 | "EventSource": "aws:sns", |
| 102 | "Sns": { |
| 103 | "SignatureVersion": "1", |
| 104 | "Timestamp": "1970-01-01T00:00:00.000Z", |
| 105 | "Signature": "EXAMPLE", |
| 106 | "SigningCertUrl": "EXAMPLE", |
| 107 | "MessageId": "95df01b4-ee98-5cb9-9903-4c221d41eb5e", |
| 108 | "Message": options.message, |
| 109 | "MessageAttributes": { |
| 110 | "Test": { |
| 111 | "Type": "String", |
| 112 | "Value": "TestString" |
| 113 | }, |
| 114 | "TestBinary": { |
| 115 | "Type": "Binary", |
| 116 | "Value": "TestBinary" |
| 117 | } |
| 118 | }, |
| 119 | "Type": "Notification", |
| 120 | "UnsubscribeUrl": "EXAMPLE", |
| 121 | "TopicArn": "arn:aws:sns:EXAMPLE", |
| 122 | "Subject": "TestInvoke" |
| 123 | } |
| 124 | } |
| 125 | ] |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | function createS3Event() { |
| 130 | return { |
nothing calls this directly
no test coverage detected