diff --git a/eventsources/sources/awssns/start.go b/eventsources/sources/awssns/start.go index a2a745a02b..5dcadb9aca 100644 --- a/eventsources/sources/awssns/start.go +++ b/eventsources/sources/awssns/start.go @@ -130,6 +130,11 @@ func (router *Router) HandleRoute(writer http.ResponseWriter, request *http.Requ return } + if notification == nil { + common.SendErrorResponse(writer, "bad request, not a valid SNS notification") + return + } + // SNS Signature Verification if router.eventSource.ValidateSignature { err = notification.verify()