diff --git a/src/index.js b/src/index.js index 39b3d3b..b923c59 100644 --- a/src/index.js +++ b/src/index.js @@ -492,7 +492,7 @@ module.exports.warmUp = async (event, context) => { FunctionName: func.name, InvocationType: 'RequestResponse', LogType: 'None', - Qualifier: process.env.SERVERLESS_ALIAS || '$LATEST', + Qualifier: process.env.SERVERLESS_ALIAS, Payload: func.config.payload }; @@ -554,7 +554,7 @@ module.exports.warmUp = async (event, context) => { FunctionName: warmupOpts.name, InvocationType: 'RequestResponse', LogType: 'None', - Qualifier: SERVERLESS_ALIAS || '$LATEST', + Qualifier: SERVERLESS_ALIAS, Payload: warmupOpts.payload, }; diff --git a/test/hook.afterDeployDeploy.test.js b/test/hook.afterDeployDeploy.test.js index 0fb6acb..18c21ed 100644 --- a/test/hook.afterDeployDeploy.test.js +++ b/test/hook.afterDeployDeploy.test.js @@ -27,7 +27,7 @@ describe('Serverless warmup plugin after:deploy:deploy hook', () => { FunctionName: 'warmup-test-dev-warmup-plugin', InvocationType: 'RequestResponse', LogType: 'None', - Qualifier: '$LATEST', + Qualifier: undefined, Payload: '{"source":"serverless-plugin-warmup"}', }; expect(mockProvider.request).toHaveBeenCalledWith('Lambda', 'invoke', params); @@ -95,7 +95,7 @@ describe('Serverless warmup plugin after:deploy:deploy hook', () => { FunctionName: 'warmup-test-dev-warmup-plugin', InvocationType: 'RequestResponse', LogType: 'None', - Qualifier: '$LATEST', + Qualifier: undefined, Payload: '{"source":"serverless-plugin-warmup"}', }; expect(mockProvider.request).toHaveBeenCalledWith('Lambda', 'invoke', params); diff --git a/test/utils/configUtils.js b/test/utils/configUtils.js index 86ebcd8..a2fa6a8 100644 --- a/test/utils/configUtils.js +++ b/test/utils/configUtils.js @@ -53,7 +53,6 @@ function getExpectedLambdaCallOptions(funcName, options = {}) { FunctionName: funcName, InvocationType: 'RequestResponse', LogType: 'None', - Qualifier: '$LATEST', Payload: '{"source":"serverless-plugin-warmup"}', ...options, };