             Timeout:      config.Timeout,
             Code:         {ZipFile: zipBody},
           }
-          # console.log(JSON.stringify({createFunctionParam: createFunctionParam}, null, 2))
           updateFunctionConfigurationParam = {
             FunctionName: config.FunctionName,
             Description:  config.Description,

              else
                return Promise.reject(result)
        .then (result)->
          # console.log(JSON.stringify({then: result}, null, 2))
          console.log("Successful deploy function.")
          # callback()
        .catch (result)->
          # console.log(JSON.stringify({catch: result}, null, 2))
          console.log("Failed deploy function.")
          console.log(result)
          console.log(result.stack) if result?.stack?

            MemorySize:   config.MemorySize,
            Timeout:      config.Timeout,
          }
          updateFunctionCodeParam = {
            FunctionName: config.FunctionName,
            ZipFile:      zipBody,
          }
          console.log "Creating function..."
          return lambda.createFunction(createFunctionParam)
            .then (result)->
              console.log "Created function."
              return Promise.resolve(result)
            .catch (result)->
              if result?.error?.statusCode == 409
                console.log "Function already exist"
                console.log "Updating function configuration..."
                return lambda.updateFunctionConfiguration(updateFunctionConfigurationParam)
