diff --git a/lib/plugins/aws/package/compile/events/apiGateway/index.js b/lib/plugins/aws/package/compile/events/apiGateway/index.js index b89ca8d96..ac9042869 100644 --- a/lib/plugins/aws/package/compile/events/apiGateway/index.js +++ b/lib/plugins/aws/package/compile/events/apiGateway/index.js @@ -75,10 +75,6 @@ class AwsCompileApigEvents { const getServiceState = require('../../../../lib/getServiceState').getServiceState; const state = getServiceState.call(this); - if (!this.serverless.utils.isEventUsed(state.service.functions, 'http')) { - return BbPromise.resolve(); - } - const updateStage = require('./lib/hack/updateStage').updateStage; this.state = state; diff --git a/lib/plugins/aws/package/compile/events/apiGateway/index.test.js b/lib/plugins/aws/package/compile/events/apiGateway/index.test.js index ca4042838..3009f8de1 100644 --- a/lib/plugins/aws/package/compile/events/apiGateway/index.test.js +++ b/lib/plugins/aws/package/compile/events/apiGateway/index.test.js @@ -142,7 +142,7 @@ describe('AwsCompileApigEvents', () => { }); }); - it('should skip the updateStage step when no http events are found', () => { + it('should not skip the updateStage step when no http events are found', () => { getServiceStateStub.returns({ service: { functions: { @@ -154,7 +154,7 @@ describe('AwsCompileApigEvents', () => { }); return awsCompileApigEvents.hooks['after:deploy:deploy']().then(() => { - expect(updateStageStub.calledOnce).to.equal(false); + expect(updateStageStub.calledOnce).to.equal(true); }); }); });