diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/restApi.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/restApi.js index 83699a98b..7681b8200 100644 --- a/lib/plugins/aws/package/compile/events/apiGateway/lib/restApi.js +++ b/lib/plugins/aws/package/compile/events/apiGateway/lib/restApi.js @@ -5,7 +5,7 @@ const BbPromise = require('bluebird'); module.exports = { compileRestApi() { - const apiGateway = this.serverless.service.provider.apiGateway; + const apiGateway = this.serverless.service.provider.apiGateway || {}; // immediately return if we're using an external REST API id if (apiGateway && apiGateway.restApiId) {