File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 11from aws_cdk import (
22 App ,
33 Aspects ,
4+ CfnOutput ,
45 DockerVolume ,
56 Environment ,
67 RemovalPolicy ,
@@ -55,7 +56,7 @@ def __init__(
5556 removal_policy = RemovalPolicy .DESTROY ,
5657 )
5758
58- lambda_python .PythonFunction (
59+ lambda_function = lambda_python .PythonFunction (
5960 self ,
6061 "ServerFunction" ,
6162 function_name = "mcp-server-mcpdoc" + stack_name_suffix ,
@@ -83,6 +84,21 @@ def __init__(
8384 ),
8485 )
8586
87+ # Function URL with AWS IAM authorization
88+ function_url = lambda_ .FunctionUrl (
89+ self ,
90+ "FunctionUrl" ,
91+ function = lambda_function ,
92+ auth_type = lambda_ .FunctionUrlAuthType .AWS_IAM ,
93+ )
94+
95+ CfnOutput (
96+ self ,
97+ "FunctionUrlOutput" ,
98+ value = function_url .url ,
99+ export_name = f"McpDocServerUrl{ stack_name_suffix } " ,
100+ )
101+
86102
87103app = App ()
88104env = Environment (account = os .environ ["CDK_DEFAULT_ACCOUNT" ], region = "us-east-2" )
You can’t perform that action at this time.
0 commit comments