diff --git a/lib/actions/EndpointBuildApiGateway.js b/lib/actions/EndpointBuildApiGateway.js index 580a510e7..9066017c7 100644 --- a/lib/actions/EndpointBuildApiGateway.js +++ b/lib/actions/EndpointBuildApiGateway.js @@ -161,7 +161,7 @@ module.exports = function(SPlugin, serverlessPath) { if (!_this.endpoint) BbPromise.reject(new SError(`Endpoint could not be found: ${_this.evt.options.path}`)); // Set function name - _this.functionName = _this.function.getDeployedName({ + _this.functionName = _this.endpoint.getFunction().getDeployedName({ stage: _this.evt.options.stage, region: _this.evt.options.region });