Skip to content

Commit fe57474

Browse files
committed
Fixed issues for Bedrock access
1 parent 0de5669 commit fe57474

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

infrastructure/cdk/src/main/java/com/unicorn/core/InfrastructureLambdaBedrock.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ public InfrastructureLambdaBedrock(Construct scope, String id, String region, Bu
182182
.description("URL for invoking the Thread Dump Lambda function")
183183
.value(functionUrl.getUrl())
184184
.build();
185+
186+
// Output the Lambda security group ID for reference
187+
CfnOutput.Builder.create(this, "LambdaSecurityGroupOutput")
188+
.description("Security Group ID for the Lambda function")
189+
.value(lambdaSg.getSecurityGroupId())
190+
.build();
191+
185192
}
186193

187194
public Function getThreadDumpFunction() {

infrastructure/lambda/src/lambda_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def process_alert(cluster_type, cluster_name, task_pod_id, container_name, names
140140
ecs_client = ECSClient(cluster_name)
141141
container_ip = ecs_client.get_container_ip(task_pod_id)
142142

143-
response = requests.get(f"http://{container_ip}:9404/actuator/threaddump", timeout=10)
143+
response = requests.get(f"http://{container_ip}:8080/actuator/threaddump", timeout=10)
144144
response.raise_for_status()
145145
thread_dump = response.text
146146

@@ -149,7 +149,7 @@ def process_alert(cluster_type, cluster_name, task_pod_id, container_name, names
149149
# Use the container_ip provided in the alert
150150
logger.info(f"Using pod IP from alert: {container_ip}")
151151
try:
152-
response = requests.get(f"http://{container_ip}:9404/actuator/threaddump", timeout=10)
152+
response = requests.get(f"http://{container_ip}:8080/actuator/threaddump", timeout=10)
153153
response.raise_for_status()
154154
thread_dump = response.text
155155
except Exception as e:

0 commit comments

Comments
 (0)