diff --git a/lib/plugins/aws/package/compile/events/alb/lib/validate.js b/lib/plugins/aws/package/compile/events/alb/lib/validate.js index 96d05cbc5c8..f69212cefba 100644 --- a/lib/plugins/aws/package/compile/events/alb/lib/validate.js +++ b/lib/plugins/aws/package/compile/events/alb/lib/validate.js @@ -12,7 +12,7 @@ module.exports = { validate() { const authorizers = {}; const albAuthConfig = this.serverless.service.provider.alb; - if (albAuthConfig) { + if (albAuthConfig && albAuthConfig.authorizers) { for (const [name, auth] of Object.entries(albAuthConfig.authorizers)) { switch (auth.type) { case 'cognito':