File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -294,8 +294,10 @@ def create_function(cfg, path_to_zip_file):
294294 client = get_client ('lambda' , aws_access_key_id , aws_secret_access_key ,
295295 cfg .get ('region' ))
296296
297+ function_name = os .environ .get ('LAMBDA_FUNCTION_NAME' ) or cfg .get ('function_name' )
298+ print ('Creating lambda function with name: {}' .format (function_name ))
297299 client .create_function (
298- FunctionName = cfg . get ( ' function_name' ) ,
300+ FunctionName = function_name ,
299301 Runtime = cfg .get ('runtime' , 'python2.7' ),
300302 Role = role ,
301303 Handler = cfg .get ('handler' ),
@@ -306,7 +308,7 @@ def create_function(cfg, path_to_zip_file):
306308 Environment = {
307309 'Variables' : {
308310 key .strip ('LAMBDA_' ): value
309- for key , value in os .envinron .items ()
311+ for key , value in os .environ .items ()
310312 if key .startswith ('LAMBDA_' )
311313 }
312314 },
You can’t perform that action at this time.
0 commit comments