Skip to content

Commit 9fe46bc

Browse files
whummerclaude
andcommitted
fix resource matching for logs operations without logGroupName
Operations like GetQueryResults, StopQuery, and DescribeQueries use queryId instead of logGroupName, so they should be proxied when the logs service is configured regardless of resource pattern. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a867113 commit 9fe46bc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

aws-proxy/aws_proxy/server/aws_request_forwarder.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ def _request_matches_resource(
161161
if name:
162162
log_group_arn = f"arn:aws:logs:{context.region}:{context.account_id}:log-group:{name}:*"
163163
return bool(re.match(resource_name_pattern, log_group_arn))
164+
# Operations that don't have a log group name but should still be proxied
165+
# (e.g., GetQueryResults uses queryId, not logGroupName)
166+
operation_name = context.operation.name if context.operation else ""
167+
if operation_name in {
168+
"GetQueryResults",
169+
"StopQuery",
170+
"DescribeQueries",
171+
}:
172+
return True
164173
# No log group name specified - check if pattern is generic
165174
return bool(re.match(resource_name_pattern, ".*"))
166175
except re.error as e:

0 commit comments

Comments
 (0)