Add EKS Node Diagnostics MCP server - #41
Open
shyamkulkarni wants to merge 4 commits into
Open
Conversation
Port the sample-eks-node-diagnostics-mcp project into mcp/aws-eks-node-diagnostics-mcp/, including CDK infrastructure, Lambda sources, diagnostic runbooks, CNI semantics, the packaged skill, and tests. The skill archive (skills/eks-node-diagnostics.zip) is force-added because the repo's root .gitignore (*.zip) would otherwise exclude it.
Drop skills/eks-node-diagnostics.zip and its README section per review feedback; the skill is not required for the MCP server to function.
…proval Remove the restricted tcpdump_capture/tcpdump_analyze tools and gate the two mutating tools (collect, batch_collect) behind an out-of-band human approval flow instead: - Approval Lambda + Function URL with capability-URL tokens (SHA-256 stored server-side, single-use, DynamoDB TTL expiry) - SNS topic notifies approvers with approve/deny links - batch_collect defaults to dry-run - Stricter EKS instance validation: user-settable kubernetes.io/cluster/* tag rejected unless ALLOW_SELF_MANAGED_NODES=true - ReDoS-safe search regex validation and log-key path checks - Update README, architecture docs, and runbooks accordingly - Add pytest coverage for the approval flow
Replace the custom DynamoDB + Lambda Function URL approval flow with SSM Automation wrapper documents whose first step is the native aws:approve action. Approvers are fixed IAM principals set at deploy time (APPROVAL_APPROVER_ARNS) and approve/deny in the Systems Manager console; decisions are IAM-authenticated and CloudTrail-audited. The agent polls status() and collection proceeds automatically on approval, so no approvalId re-call is needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the AWS EKS Node Diagnostics MCP server (
mcp/aws-eks-node-diagnostics-mcp): a CDK-deployed MCP server that lets the DevOps Agent collect and analyze EKS worker node logs via SSM Automation (the AWS-managedAWSSupport-CollectEKSInstanceLogsdocument), with 19 tools across four tiers (core operations, log analysis, cluster-level diagnostics, and 41 structured SOP runbooks).Key design points:
collectandbatch_collect, run through wrapper SSM Automation documents whose first step is the nativeaws:approveaction. The execution pauses in SSM until a designated approver (IAM principals fixed at deploy time viaAPPROVAL_APPROVER_ARNS) approves in the Systems Manager console. Decisions are IAM-authenticated and CloudTrail-audited; the MCP Lambda has nossm:SendAutomationSignalpermission, so an agent cannot approve its own request. The agent just pollsstatus()and collection proceeds automatically on approval.Type of change
Testing
npm run build(tsc) — passesnpm test— 12/12 jest tests passed (fast-check property tests for construct IAM and KMS/S3 policies), 44/44 pytest tests passed (approval workflow, region validation, tool validation wiring)deploy.shand exercised the approval flow end to end:collectreturnspending_approvalwith an SSM console deep link, approval in the console resumes collection, andstatus()reports the approval state and collection progressLicense confirmation