File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
localstack/services/awslambda Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -682,6 +682,29 @@ def get_function_code(function):
682
682
headers = {'Content-Disposition' : 'attachment; filename=lambda_archive.zip' })
683
683
684
684
685
+ @app .route ('%s/functions/<function>/configuration' % PATH_ROOT , methods = ['GET' ])
686
+ def get_function_configuration (function ):
687
+ """ Get the configuration of an existing function
688
+ ---
689
+ operationId: 'getFunctionConfiguration'
690
+ parameters:
691
+ """
692
+ arn = func_arn (function )
693
+ lambda_details = arn_to_lambda .get (arn )
694
+ if not lambda_details :
695
+ return error_response ('Function not found: %s' % arn , 404 , error_type = 'ResourceNotFoundException' )
696
+ result = {
697
+ 'Version' : '$LATEST' ,
698
+ 'FunctionName' : function ,
699
+ 'FunctionArn' : arn ,
700
+ 'Handler' : lambda_details .handler ,
701
+ 'Runtime' : lambda_details .runtime ,
702
+ 'Timeout' : LAMBDA_DEFAULT_TIMEOUT ,
703
+ 'Environment' : lambda_details .envvars
704
+ }
705
+ return jsonify (result )
706
+
707
+
685
708
@app .route ('%s/functions/<function>/configuration' % PATH_ROOT , methods = ['PUT' ])
686
709
def update_function_configuration (function ):
687
710
""" Update the configuration of an existing function
You can’t perform that action at this time.
0 commit comments