@@ -64,6 +64,47 @@ function _injectAwsSdkIntoDeps(deps) {
     }
 }
 
+function _createFromInlinedFunction() {
+    var deps = arguments[1] || [];
+    _injectAwsSdkIntoDeps(deps);
+
+    var resolvedDeps = deps.map(function(d) {
+        return _resolvePathFromParent(d);
+    });
+
+    return _lambdaHelper.getCloudedFunctionFromFunction(arguments[0], resolvedDeps, arguments[2]);
+};
+
+function _createFromModule() {
+    var module = _resolvePathFromParent(arguments[0]),
+        handlerName,
+        deps,
+        resolvedDeps,
+        configs;
+
+    if(typeof(arguments[1]) === 'string') {
+        handlerName = arguments[1];
+        deps = arguments[2] || [];
+        configs = arguments[3];
+    } else {
+        handlerName = null;
+        deps = arguments[1] || [];
+        configs = arguments[2];
+    }
+
+    _injectAwsSdkIntoDeps(deps);
+
+    resolvedDeps = deps.map(function(d) {
+        return _resolvePathFromParent(d);
+    });
+
+    return _lambdaHelper.getCloudedFunctionFromModule(module, handlerName, resolvedDeps, configs);
+};
+
+function _createFromZipFile() {
+    console.log('create from zip file', arguments);
+};
+
 // Public API
 var exports = module.exports = {};
 
@@ -106,40 +147,14 @@ exports.start = function (startedCallback) {
 };
 
 exports.create = function () {
-    if(typeof(arguments[0]) === 'function') {
-        var deps = arguments[1] || [];
-        _injectAwsSdkIntoDeps(deps);
-
-        var resolvedDeps = deps.map(function(d) {
-            return _resolvePathFromParent(d);
-        });
-
-        return _lambdaHelper.getCloudedFunctionFromFunction(arguments[0], resolvedDeps, arguments[2]);
+    if(typeof arguments[0] === 'function') {
+        return _createFromInlinedFunction.apply(this, arguments);
     }
-    else {
-        var module = _resolvePathFromParent(arguments[0]),
-            handlerName,
-            deps,
-            resolvedDeps,
-            configs;
-
-        if(typeof(arguments[1]) === 'string') {
-            handlerName = arguments[1];
-            deps = arguments[2] || [];
-            configs = arguments[3];
-        } else {
-            handlerName = null;
-            deps = arguments[1] || [];
-            configs = arguments[2];
-        }
-
-        _injectAwsSdkIntoDeps(deps);
-
-        resolvedDeps = deps.map(function(d) {
-            return _resolvePathFromParent(d);
-        });
-
-        return _lambdaHelper.getCloudedFunctionFromModule(module, handlerName, resolvedDeps, configs);
+    else if(typeof arguments[0] === 'string') {
+        return _createFromModule.apply(this, arguments);   
+    }
+    else if(arguments[0] instanceof Buffer) {
+        return _createFromZipFile.apply(this, arguments);
     }
 };
 