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 1
1
from aws_cdk import (
2
2
App ,
3
3
Aspects ,
4
+ CfnOutput ,
4
5
DockerVolume ,
5
6
Environment ,
6
7
RemovalPolicy ,
@@ -55,7 +56,7 @@ def __init__(
55
56
removal_policy = RemovalPolicy .DESTROY ,
56
57
)
57
58
58
- lambda_python .PythonFunction (
59
+ lambda_function = lambda_python .PythonFunction (
59
60
self ,
60
61
"ServerFunction" ,
61
62
function_name = "mcp-server-mcpdoc" + stack_name_suffix ,
@@ -83,6 +84,21 @@ def __init__(
83
84
),
84
85
)
85
86
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
+
86
102
87
103
app = App ()
88
104
env = Environment (account = os .environ ["CDK_DEFAULT_ACCOUNT" ], region = "us-east-2" )
You can’t perform that action at this time.
0 commit comments