diff --git a/README.md b/README.md index 5c84bc3..b584bc9 100644 --- a/README.md +++ b/README.md @@ -384,10 +384,16 @@ Depending on your Lambda function, you might need to increase the timeout value. If you wish to increase this timeout set the value here. ##### options.memory - Type: `Integer` - Default value: `null` - Sets the memory assigned to the function. If null then the current setting for the function will be used. Value is in - MB and must be a multiple of 64. +Type: `Integer` +Default value: `null` + +Sets the memory assigned to the function. If null then the current setting for the function will be used. Value is in MB and must be a multiple of 64. + +##### options.handler +Type: `String` +Default value: `null` + +Sets the handler for your lambda function. If left null, the current setting will remain unchanged. #### Usage Examples diff --git a/tasks/lambda_deploy.js b/tasks/lambda_deploy.js index c8fcf6f..e530dad 100644 --- a/tasks/lambda_deploy.js +++ b/tasks/lambda_deploy.js @@ -30,7 +30,8 @@ module.exports = function (grunt) { credentialsJSON: null, region: 'us-east-1', timeout: null, - memory: null + memory: null, + handler: null }); if (options.profile !== null) { @@ -103,6 +104,10 @@ module.exports = function (grunt) { configParams.MemorySize = options.memory; } + if (options.handler !== null) { + configParams.Handler = options.handler; + } + var updateConfig = function(func_name, func_options, callback) { if(Object.keys(func_options).length > 0) { func_options.FunctionName = func_name;