#
tokens: 57029/50000 1/2630 files (page 684/717)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 684 of 717. Use http://codebase.md/awslabs/mcp?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .devcontainer
│   └── devcontainer.json
├── .github
│   ├── actions
│   │   ├── build-and-push-container-image
│   │   │   └── action.yml
│   │   └── clear-space-ubuntu-latest-agressively
│   │       └── action.yml
│   ├── codecov.yml
│   ├── CODEOWNERS
│   ├── dependabot.yml
│   ├── ISSUE_TEMPLATE
│   │   ├── bug_report.yml
│   │   ├── documentation.yml
│   │   ├── feature_request.yml
│   │   ├── rfc.yml
│   │   └── support_awslabs_mcp_servers.yml
│   ├── pull_request_template.md
│   ├── SECURITY
│   ├── SUPPORT
│   └── workflows
│       ├── aws-api-mcp-upgrade-version.yml
│       ├── bandit-requirements.txt
│       ├── bandit.yml
│       ├── cfn_nag.yml
│       ├── check-gh-pages-builds.yml
│       ├── check-license-header-hash.txt
│       ├── check-license-header-slash.txt
│       ├── check-license-header.json
│       ├── check-license-header.yml
│       ├── checkov.yml
│       ├── codeql.yml
│       ├── dependency-review-action.yml
│       ├── detect-secrets-requirements.txt
│       ├── gh-pages.yml
│       ├── merge-prevention.yml
│       ├── powershell.yml
│       ├── pre-commit-requirements.txt
│       ├── pre-commit.yml
│       ├── pull-request-lint.yml
│       ├── python.yml
│       ├── RELEASE_INSTRUCTIONS.md
│       ├── release-initiate-branch.yml
│       ├── release-merge-tag.yml
│       ├── release.py
│       ├── release.yml
│       ├── scanners.yml
│       ├── scorecard-analysis.yml
│       ├── semgrep-requirements.txt
│       ├── semgrep.yml
│       ├── stale.yml
│       ├── trivy.yml
│       └── typescript.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── .ruff.toml
├── .secrets.baseline
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DESIGN_GUIDELINES.md
├── DEVELOPER_GUIDE.md
├── docs
│   └── images
│       └── root-readme
│           ├── cline-api-provider-filled.png
│           ├── cline-chat-interface.png
│           ├── cline-custom-instructions.png
│           ├── cline-select-aws-profile.png
│           ├── cline-select-bedrock.png
│           ├── configure-mcp-servers.png
│           ├── install-cline-extension.png
│           ├── mcp-servers-installed.png
│           └── select-mcp-servers.png
├── docusaurus
│   ├── .gitignore
│   ├── docs
│   │   ├── installation.md
│   │   ├── intro.md
│   │   ├── samples
│   │   │   ├── index.md
│   │   │   ├── mcp-integration-with-kb.md
│   │   │   ├── mcp-integration-with-nova-canvas.md
│   │   │   └── stepfunctions-tool-mcp-server.md
│   │   ├── servers
│   │   │   ├── amazon-bedrock-agentcore-mcp-server.md
│   │   │   ├── amazon-keyspaces-mcp-server.md
│   │   │   ├── amazon-mq-mcp-server.md
│   │   │   ├── amazon-neptune-mcp-server.md
│   │   │   ├── amazon-qbusiness-anonymous-mcp-server.md
│   │   │   ├── amazon-qindex-mcp-server.md
│   │   │   ├── amazon-sns-sqs-mcp-server.md
│   │   │   ├── aurora-dsql-mcp-server.md
│   │   │   ├── aws-api-mcp-server.md
│   │   │   ├── aws-appsync-mcp-server.md
│   │   │   ├── aws-bedrock-custom-model-import-mcp-server.md
│   │   │   ├── aws-bedrock-data-automation-mcp-server.md
│   │   │   ├── aws-dataprocessing-mcp-server.md
│   │   │   ├── aws-diagram-mcp-server.md
│   │   │   ├── aws-documentation-mcp-server.md
│   │   │   ├── aws-healthomics-mcp-server.md
│   │   │   ├── aws-iot-sitewise-mcp-server.md
│   │   │   ├── aws-knowledge-mcp-server.md
│   │   │   ├── aws-location-mcp-server.md
│   │   │   ├── aws-msk-mcp-server.md
│   │   │   ├── aws-pricing-mcp-server.md
│   │   │   ├── aws-serverless-mcp-server.md
│   │   │   ├── aws-support-mcp-server.md
│   │   │   ├── bedrock-kb-retrieval-mcp-server.md
│   │   │   ├── billing-cost-management-mcp-server.md
│   │   │   ├── ccapi-mcp-server.md
│   │   │   ├── cdk-mcp-server.md
│   │   │   ├── cfn-mcp-server.md
│   │   │   ├── cloudtrail-mcp-server.md
│   │   │   ├── cloudwatch-applicationsignals-mcp-server.md
│   │   │   ├── cloudwatch-mcp-server.md
│   │   │   ├── code-doc-gen-mcp-server.md
│   │   │   ├── core-mcp-server.md
│   │   │   ├── cost-explorer-mcp-server.md
│   │   │   ├── document-loader-mcp-server.md
│   │   │   ├── documentdb-mcp-server.md
│   │   │   ├── dynamodb-mcp-server.md
│   │   │   ├── ecs-mcp-server.md
│   │   │   ├── eks-mcp-server.md
│   │   │   ├── elasticache-mcp-server.md
│   │   │   ├── finch-mcp-server.md
│   │   │   ├── frontend-mcp-server.md
│   │   │   ├── git-repo-research-mcp-server.md
│   │   │   ├── healthlake-mcp-server.md
│   │   │   ├── iam-mcp-server.md
│   │   │   ├── kendra-index-mcp-server.md
│   │   │   ├── lambda-tool-mcp-server.md
│   │   │   ├── memcached-mcp-server.md
│   │   │   ├── mysql-mcp-server.md
│   │   │   ├── nova-canvas-mcp-server.md
│   │   │   ├── openapi-mcp-server.md
│   │   │   ├── postgres-mcp-server.md
│   │   │   ├── prometheus-mcp-server.md
│   │   │   ├── redshift-mcp-server.md
│   │   │   ├── s3-tables-mcp-server.md
│   │   │   ├── stepfunctions-tool-mcp-server.md
│   │   │   ├── syntheticdata-mcp-server.md
│   │   │   ├── terraform-mcp-server.md
│   │   │   ├── timestream-for-influxdb-mcp-server.md
│   │   │   ├── valkey-mcp-server.md
│   │   │   └── well-architected-security-mcp-server.mdx
│   │   └── vibe_coding.md
│   ├── docusaurus.config.ts
│   ├── package-lock.json
│   ├── package.json
│   ├── README.md
│   ├── sidebars.ts
│   ├── src
│   │   ├── components
│   │   │   ├── HomepageFeatures
│   │   │   │   └── styles.module.css
│   │   │   └── ServerCards
│   │   │       ├── index.tsx
│   │   │       └── styles.module.css
│   │   ├── css
│   │   │   ├── custom.css
│   │   │   └── doc-override.css
│   │   └── pages
│   │       ├── index.module.css
│   │       └── servers.tsx
│   ├── static
│   │   ├── .nojekyll
│   │   ├── assets
│   │   │   ├── icons
│   │   │   │   ├── activity.svg
│   │   │   │   ├── book-open.svg
│   │   │   │   ├── cpu.svg
│   │   │   │   ├── database.svg
│   │   │   │   ├── dollar-sign.svg
│   │   │   │   ├── help-circle.svg
│   │   │   │   ├── key.svg
│   │   │   │   ├── server.svg
│   │   │   │   ├── share-2.svg
│   │   │   │   ├── tool.svg
│   │   │   │   └── zap.svg
│   │   │   └── server-cards.json
│   │   └── img
│   │       ├── aws-logo.svg
│   │       └── logo.png
│   └── tsconfig.json
├── LICENSE
├── NOTICE
├── README.md
├── samples
│   ├── mcp-integration-with-kb
│   │   ├── .env.example
│   │   ├── .python-version
│   │   ├── assets
│   │   │   └── simplified-mcp-flow-diagram.png
│   │   ├── clients
│   │   │   └── client_server.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── user_interfaces
│   │   │   └── chat_bedrock_st.py
│   │   └── uv.lock
│   ├── mcp-integration-with-nova-canvas
│   │   ├── .env.example
│   │   ├── .python-version
│   │   ├── clients
│   │   │   └── client_server.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── user_interfaces
│   │   │   └── image_generator_st.py
│   │   └── uv.lock
│   ├── README.md
│   └── stepfunctions-tool-mcp-server
│       ├── README.md
│       └── sample_state_machines
│           ├── customer-create
│           │   └── app.py
│           ├── customer-id-from-email
│           │   └── app.py
│           ├── customer-info-from-id
│           │   └── app.py
│           └── template.yml
├── scripts
│   ├── README.md
│   └── verify_package_name.py
├── src
│   ├── amazon-bedrock-agentcore-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_bedrock_agentcore_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── config.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── cache.py
│   │   │           ├── doc_fetcher.py
│   │   │           ├── indexer.py
│   │   │           ├── text_processor.py
│   │   │           └── url_validator.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── SECURITY.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_cache.py
│   │   │   ├── test_config.py
│   │   │   ├── test_doc_fetcher.py
│   │   │   ├── test_indexer.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_server.py
│   │   │   ├── test_text_processor.py
│   │   │   └── test_url_validator.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-kendra-index-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_kendra_index_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       └── util.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-keyspaces-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_keyspaces_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── client.py
│   │   │       ├── config.py
│   │   │       ├── consts.py
│   │   │       ├── llm_context.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       └── services.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_client.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_query_analysis_service.py
│   │   │   ├── test_server.py
│   │   │   └── test_services.py
│   │   └── uv.lock
│   ├── amazon-mq-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_mq_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_service_mcp_generator.py
│   │   │       ├── consts.py
│   │   │       ├── rabbitmq
│   │   │       │   ├── __init__.py
│   │   │       │   ├── admin.py
│   │   │       │   ├── connection.py
│   │   │       │   ├── doc
│   │   │       │   │   ├── rabbitmq_broker_sizing_guide.md
│   │   │       │   │   ├── rabbitmq_performance_optimization_best_practice.md
│   │   │       │   │   ├── rabbitmq_production_deployment_guidelines.md
│   │   │       │   │   ├── rabbitmq_quorum_queue_migration_guide.md
│   │   │       │   │   └── rabbitmq_setup_best_practice.md
│   │   │       │   ├── handlers.py
│   │   │       │   └── module.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── example
│   │   │   └── sample_mcp_q_cli.json
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── rabbitmq
│   │   │   │   ├── __init__.py
│   │   │   │   ├── conftest.py
│   │   │   │   ├── test_admin.py
│   │   │   │   ├── test_connection.py
│   │   │   │   ├── test_handlers.py
│   │   │   │   └── test_module.py
│   │   │   ├── test_aws_service_mcp_generator.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-neptune-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_neptune_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── exceptions.py
│   │   │       ├── graph_store
│   │   │       │   ├── __init__.py
│   │   │       │   ├── analytics.py
│   │   │       │   ├── base.py
│   │   │       │   └── database.py
│   │   │       ├── models.py
│   │   │       ├── neptune.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_analytics.py
│   │   │   ├── test_database.py
│   │   │   ├── test_exceptions.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_neptune.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-qbusiness-anonymous-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_qbusiness_anonymous_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── clients.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── amazon-qindex-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_qindex_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── clients.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_clients.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   └── uv.lock
│   ├── amazon-sns-sqs-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── amazon_sns_sqs_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common.py
│   │   │       ├── consts.py
│   │   │       ├── generator.py
│   │   │       ├── server.py
│   │   │       ├── sns.py
│   │   │       └── sqs.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── print_tools.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── test_common.py
│   │   │   ├── test_generator.py
│   │   │   ├── test_server.py
│   │   │   ├── test_sns.py
│   │   │   └── test_sqs.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aurora-dsql-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aurora_dsql_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── mutable_sql_detector.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_connection_reuse.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_profile_option.py
│   │   │   ├── test_readonly_enforcement.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-api-mcp-server
│   │   ├── .gitattributes
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_api_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── core
│   │   │       │   ├── __init__.py
│   │   │       │   ├── agent_scripts
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── manager.py
│   │   │       │   │   ├── models.py
│   │   │       │   │   └── registry
│   │   │       │   │       ├── __init__.py
│   │   │       │   │       ├── application-failure-troubleshooting.script.md
│   │   │       │   │       ├── cloudtral-mutli-region-setup.script.md
│   │   │       │   │       ├── create_amazon_aurora_db_cluster_with_instances.script.md
│   │   │       │   │       ├── lambda-timeout-debugging.script.md
│   │   │       │   │       ├── scripts_format.md
│   │   │       │   │       └── troubleshoot-permissions-with-cloudtrail-events.script.md
│   │   │       │   ├── aws
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── driver.py
│   │   │       │   │   ├── pagination.py
│   │   │       │   │   ├── regions.py
│   │   │       │   │   ├── service.py
│   │   │       │   │   └── services.py
│   │   │       │   ├── common
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── command_metadata.py
│   │   │       │   │   ├── command.py
│   │   │       │   │   ├── config.py
│   │   │       │   │   ├── errors.py
│   │   │       │   │   ├── file_operations.py
│   │   │       │   │   ├── file_system_controls.py
│   │   │       │   │   ├── helpers.py
│   │   │       │   │   ├── models.py
│   │   │       │   │   └── py.typed
│   │   │       │   ├── data
│   │   │       │   │   └── api_metadata.json
│   │   │       │   ├── metadata
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   └── read_only_operations_list.py
│   │   │       │   ├── parser
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── custom_validators
│   │   │       │   │   │   ├── __init__.py
│   │   │       │   │   │   ├── botocore_param_validator.py
│   │   │       │   │   │   ├── ec2_validator.py
│   │   │       │   │   │   └── ssm_validator.py
│   │   │       │   │   ├── interpretation.py
│   │   │       │   │   ├── lexer.py
│   │   │       │   │   └── parser.py
│   │   │       │   ├── py.typed
│   │   │       │   └── security
│   │   │       │       ├── __init__.py
│   │   │       │       ├── aws_api_customization.json
│   │   │       │       └── policy.py
│   │   │       ├── middleware
│   │   │       │   ├── __init__.py
│   │   │       │   └── http_header_validation_middleware.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── DEPLOYMENT.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── agent_scripts
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_manager.py
│   │   │   │   └── test_registry
│   │   │   │       ├── another_valid_script.script.md
│   │   │   │       ├── test_script.script.md
│   │   │   │       └── valid_script.script.md
│   │   │   ├── aws
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_driver.py
│   │   │   │   ├── test_pagination.py
│   │   │   │   ├── test_service.py
│   │   │   │   └── test_services.py
│   │   │   ├── common
│   │   │   │   ├── test_command.py
│   │   │   │   ├── test_config.py
│   │   │   │   ├── test_file_operations.py
│   │   │   │   ├── test_file_system_controls.py
│   │   │   │   ├── test_file_validation.py
│   │   │   │   └── test_helpers.py
│   │   │   ├── fixtures.py
│   │   │   ├── history_handler.py
│   │   │   ├── metadata
│   │   │   │   ├── __init__.py
│   │   │   │   └── test_read_only_operations_list.py
│   │   │   ├── middleware
│   │   │   │   └── test_http_header_validation_middleware.py
│   │   │   ├── parser
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_file_path_detection.py
│   │   │   │   ├── test_lexer.py
│   │   │   │   ├── test_parser_customizations.py
│   │   │   │   └── test_parser.py
│   │   │   ├── test_security_policy.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-appsync-mcp-server
│   │   ├── .dockerignore
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_appsync_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── decorators.py
│   │   │       ├── helpers.py
│   │   │       ├── operations
│   │   │       │   ├── __init__.py
│   │   │       │   ├── create_api_cache.py
│   │   │       │   ├── create_api_key.py
│   │   │       │   ├── create_api.py
│   │   │       │   ├── create_channel_namespace.py
│   │   │       │   ├── create_datasource.py
│   │   │       │   ├── create_domain_name.py
│   │   │       │   ├── create_function.py
│   │   │       │   ├── create_graphql_api.py
│   │   │       │   ├── create_resolver.py
│   │   │       │   └── create_schema.py
│   │   │       ├── server.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── create_api_cache.py
│   │   │       │   ├── create_api_key.py
│   │   │       │   ├── create_api.py
│   │   │       │   ├── create_channel_namespace.py
│   │   │       │   ├── create_datasource.py
│   │   │       │   ├── create_domain_name.py
│   │   │       │   ├── create_function.py
│   │   │       │   ├── create_graphql_api.py
│   │   │       │   ├── create_resolver.py
│   │   │       │   └── create_schema.py
│   │   │       └── validators.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_all_create_tools_write_protection.py
│   │   │   ├── test_create_api_cache.py
│   │   │   ├── test_create_api_key.py
│   │   │   ├── test_create_api.py
│   │   │   ├── test_create_channel_namespace.py
│   │   │   ├── test_create_datasource_tool.py
│   │   │   ├── test_create_datasource.py
│   │   │   ├── test_create_domain_name.py
│   │   │   ├── test_create_function.py
│   │   │   ├── test_create_graphql_api.py
│   │   │   ├── test_create_resolver.py
│   │   │   ├── test_create_schema_tool.py
│   │   │   ├── test_create_schema.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_server.py
│   │   │   ├── test_validators.py
│   │   │   └── test_write_operation.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-bedrock-custom-model-import-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_bedrock_custom_model_import_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── client.py
│   │   │       ├── llm_context.py
│   │   │       ├── models.py
│   │   │       ├── prompts.py
│   │   │       ├── server.py
│   │   │       ├── services
│   │   │       │   ├── __init__.py
│   │   │       │   ├── imported_model_service.py
│   │   │       │   └── model_import_service.py
│   │   │       ├── tools
│   │   │       │   ├── create_model_import_job.py
│   │   │       │   ├── delete_imported_model.py
│   │   │       │   ├── get_imported_model.py
│   │   │       │   ├── get_model_import_job.py
│   │   │       │   ├── list_imported_models.py
│   │   │       │   └── list_model_import_jobs.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── aws.py
│   │   │           ├── config.py
│   │   │           ├── consts.py
│   │   │           └── matching.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── services
│   │   │   │   ├── test_imported_model_service.py
│   │   │   │   └── test_model_import_service.py
│   │   │   ├── test_client.py
│   │   │   ├── test_init.py
│   │   │   ├── test_llm_context.py
│   │   │   ├── test_prompts.py
│   │   │   ├── test_server.py
│   │   │   ├── tools
│   │   │   │   ├── test_create_model_import_job.py
│   │   │   │   ├── test_delete_imported_model.py
│   │   │   │   ├── test_get_imported_model.py
│   │   │   │   ├── test_get_model_import_job.py
│   │   │   │   ├── test_list_imported_models.py
│   │   │   │   └── test_list_model_import_jobs.py
│   │   │   └── utils
│   │   │       ├── test_aws.py
│   │   │       ├── test_config.py
│   │   │       └── test_matching.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-bedrock-data-automation-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_bedrock_data_automation_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── helpers.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-dataprocessing-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_dataprocessing_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── core
│   │   │       │   ├── __init__.py
│   │   │       │   └── glue_data_catalog
│   │   │       │       ├── __init__.py
│   │   │       │       ├── data_catalog_database_manager.py
│   │   │       │       ├── data_catalog_handler.py
│   │   │       │       └── data_catalog_table_manager.py
│   │   │       ├── handlers
│   │   │       │   ├── __init__.py
│   │   │       │   ├── athena
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── athena_data_catalog_handler.py
│   │   │       │   │   ├── athena_query_handler.py
│   │   │       │   │   └── athena_workgroup_handler.py
│   │   │       │   ├── commons
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   └── common_resource_handler.py
│   │   │       │   ├── emr
│   │   │       │   │   ├── emr_ec2_cluster_handler.py
│   │   │       │   │   ├── emr_ec2_instance_handler.py
│   │   │       │   │   └── emr_ec2_steps_handler.py
│   │   │       │   └── glue
│   │   │       │       ├── __init__.py
│   │   │       │       ├── crawler_handler.py
│   │   │       │       ├── data_catalog_handler.py
│   │   │       │       ├── glue_commons_handler.py
│   │   │       │       ├── glue_etl_handler.py
│   │   │       │       ├── interactive_sessions_handler.py
│   │   │       │       └── worklows_handler.py
│   │   │       ├── models
│   │   │       │   ├── __init__.py
│   │   │       │   ├── athena_models.py
│   │   │       │   ├── common_resource_models.py
│   │   │       │   ├── data_catalog_models.py
│   │   │       │   ├── emr_models.py
│   │   │       │   └── glue_models.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── aws_helper.py
│   │   │           ├── consts.py
│   │   │           ├── logging_helper.py
│   │   │           └── sql_analyzer.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── core
│   │   │   │   ├── __init__.py
│   │   │   │   └── glue_data_catalog
│   │   │   │       ├── __init__.py
│   │   │   │       ├── test_data_catalog_database_manager.py
│   │   │   │       ├── test_data_catalog_handler.py
│   │   │   │       └── test_data_catalog_table_manager.py
│   │   │   ├── handlers
│   │   │   │   ├── __init__.py
│   │   │   │   ├── athena
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── test_athena_data_catalog_handler.py
│   │   │   │   │   ├── test_athena_query_handler.py
│   │   │   │   │   ├── test_athena_workgroup_handler.py
│   │   │   │   │   └── test_custom_tags_athena.py
│   │   │   │   ├── commons
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   └── test_common_resource_handler.py
│   │   │   │   ├── emr
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── test_custom_tags_emr.py
│   │   │   │   │   ├── test_emr_ec2_cluster_handler.py
│   │   │   │   │   ├── test_emr_ec2_instance_handler.py
│   │   │   │   │   └── test_emr_ec2_steps_handler.py
│   │   │   │   └── glue
│   │   │   │       ├── __init__.py
│   │   │   │       ├── test_crawler_handler.py
│   │   │   │       ├── test_custom_tags_glue.py
│   │   │   │       ├── test_data_catalog_handler.py
│   │   │   │       ├── test_glue_commons_handler.py
│   │   │   │       ├── test_glue_etl_handler.py
│   │   │   │       ├── test_glue_interactive_sessions_handler.py
│   │   │   │       └── test_glue_workflows_handler.py
│   │   │   ├── models
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_athena_models.py
│   │   │   │   ├── test_common_resource_models.py
│   │   │   │   ├── test_data_catalog_models.py
│   │   │   │   ├── test_emr_models.py
│   │   │   │   ├── test_glue_models.py
│   │   │   │   ├── test_interactive_sessions_models.py
│   │   │   │   └── test_workflows_models.py
│   │   │   ├── test_init.py
│   │   │   ├── test_server.py
│   │   │   └── utils
│   │   │       ├── __init__.py
│   │   │       ├── test_aws_helper.py
│   │   │       ├── test_custom_tags.py
│   │   │       ├── test_logging_helper.py
│   │   │       └── test_sql_analyzer.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-diagram-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_diagram_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── diagrams_tools.py
│   │   │       ├── models.py
│   │   │       ├── scanner.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── resources
│   │   │   │   ├── __init__.py
│   │   │   │   └── example_diagrams
│   │   │   │       ├── __init__.py
│   │   │   │       ├── aws_example.py
│   │   │   │       ├── flow_example.py
│   │   │   │       └── sequence_example.py
│   │   │   ├── test_diagrams.py
│   │   │   ├── test_models.py
│   │   │   ├── test_sarif_fix.py
│   │   │   ├── test_scanner.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-documentation-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_documentation_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── models.py
│   │   │       ├── server_aws_cn.py
│   │   │       ├── server_aws.py
│   │   │       ├── server_utils.py
│   │   │       ├── server.py
│   │   │       └── util.py
│   │   ├── basic-usage.gif
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── constants.py
│   │   │   ├── resources
│   │   │   │   └── lambda_sns_raw.html
│   │   │   ├── test_aws_cn_get_available_services_live.py
│   │   │   ├── test_aws_cn_read_documentation_live.py
│   │   │   ├── test_aws_read_documentation_live.py
│   │   │   ├── test_aws_recommend_live.py
│   │   │   ├── test_aws_search_live.py
│   │   │   ├── test_integ_basic.py
│   │   │   ├── test_metadata_handling.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server_aws_cn.py
│   │   │   ├── test_server_aws.py
│   │   │   ├── test_server_utils.py
│   │   │   ├── test_server.py
│   │   │   └── test_util.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-healthomics-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_healthomics_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models
│   │   │       │   ├── __init__.py
│   │   │       │   ├── core.py
│   │   │       │   ├── s3.py
│   │   │       │   └── search.py
│   │   │       ├── search
│   │   │       │   ├── __init__.py
│   │   │       │   ├── file_association_engine.py
│   │   │       │   ├── file_type_detector.py
│   │   │       │   ├── genomics_search_orchestrator.py
│   │   │       │   ├── healthomics_search_engine.py
│   │   │       │   ├── json_response_builder.py
│   │   │       │   ├── pattern_matcher.py
│   │   │       │   ├── result_ranker.py
│   │   │       │   ├── s3_search_engine.py
│   │   │       │   └── scoring_engine.py
│   │   │       ├── server.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── genomics_file_search.py
│   │   │       │   ├── helper_tools.py
│   │   │       │   ├── run_analysis.py
│   │   │       │   ├── troubleshooting.py
│   │   │       │   ├── workflow_analysis.py
│   │   │       │   ├── workflow_execution.py
│   │   │       │   ├── workflow_linting.py
│   │   │       │   └── workflow_management.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── aws_utils.py
│   │   │           ├── s3_utils.py
│   │   │           ├── search_config.py
│   │   │           └── validation_utils.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── docs
│   │   │   └── workflow_linting.md
│   │   ├── LICENSE
│   │   ├── MCP_INSPECTOR_SETUP.md
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── fixtures
│   │   │   │   └── genomics_test_data.py
│   │   │   ├── INTEGRATION_TESTS_README.md
│   │   │   ├── QUICK_REFERENCE.md
│   │   │   ├── test_aws_utils.py
│   │   │   ├── test_consts.py
│   │   │   ├── test_file_association_engine.py
│   │   │   ├── test_file_type_detector.py
│   │   │   ├── test_genomics_file_search_integration_working.py
│   │   │   ├── test_genomics_search_orchestrator.py
│   │   │   ├── test_healthomics_search_engine.py
│   │   │   ├── test_helper_tools.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_init.py
│   │   │   ├── test_integration_framework.py
│   │   │   ├── test_json_response_builder.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_pagination.py
│   │   │   ├── test_pattern_matcher.py
│   │   │   ├── test_performance_comparison.py
│   │   │   ├── test_result_ranker.py
│   │   │   ├── test_run_analysis.py
│   │   │   ├── test_s3_file_model.py
│   │   │   ├── test_s3_search_engine.py
│   │   │   ├── test_s3_utils.py
│   │   │   ├── test_scoring_engine.py
│   │   │   ├── test_search_config.py
│   │   │   ├── test_server.py
│   │   │   ├── test_troubleshooting.py
│   │   │   ├── test_validation_utils.py
│   │   │   ├── test_workflow_analysis.py
│   │   │   ├── test_workflow_execution.py
│   │   │   ├── test_workflow_linting.py
│   │   │   ├── test_workflow_management.py
│   │   │   ├── test_workflow_tools.py
│   │   │   └── TESTING_FRAMEWORK.md
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-iot-sitewise-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_iot_sitewise_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── client.py
│   │   │       ├── models
│   │   │       │   ├── computation_data_models.py
│   │   │       │   └── metadata_transfer_data_models.py
│   │   │       ├── prompts
│   │   │       │   ├── __init__.py
│   │   │       │   ├── anomaly_detection_workflow.py
│   │   │       │   ├── asset_hierarchy.py
│   │   │       │   ├── bulk_import_workflow.py
│   │   │       │   ├── data_exploration.py
│   │   │       │   └── data_ingestion.py
│   │   │       ├── server.py
│   │   │       ├── tool_metadata.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── sitewise_access.py
│   │   │       │   ├── sitewise_asset_models.py
│   │   │       │   ├── sitewise_assets.py
│   │   │       │   ├── sitewise_computation_models.py
│   │   │       │   ├── sitewise_data.py
│   │   │       │   ├── sitewise_executions.py
│   │   │       │   ├── sitewise_gateways.py
│   │   │       │   ├── sitewise_metadata_transfer.py
│   │   │       │   └── timestamp_tools.py
│   │   │       ├── validation_utils.py
│   │   │       └── validation.py
│   │   ├── CHANGELOG.md
│   │   ├── DEVELOPMENT.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── examples
│   │   │   └── wind_farm_example.py
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_server.py
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── models
│   │   │   │   ├── test_computation_data_models.py
│   │   │   │   └── test_metadata_transfer_data_models.py
│   │   │   ├── test_client.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_server.py
│   │   │   ├── test_validation_utils.py
│   │   │   ├── test_validation.py
│   │   │   └── tools
│   │   │       ├── test_sitewise_access.py
│   │   │       ├── test_sitewise_asset_models.py
│   │   │       ├── test_sitewise_assets.py
│   │   │       ├── test_sitewise_computation_models.py
│   │   │       ├── test_sitewise_data.py
│   │   │       ├── test_sitewise_executions.py
│   │   │       ├── test_sitewise_gateways.py
│   │   │       ├── test_sitewise_metadata_transfer.py
│   │   │       └── test_timestamp_tools.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-knowledge-mcp-server
│   │   └── README.md
│   ├── aws-location-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_location_server
│   │   │       ├── __init__.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_server_integration.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-msk-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_msk_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       └── tools
│   │   │           ├── __init__.py
│   │   │           ├── common_functions
│   │   │           │   ├── __init__.py
│   │   │           │   ├── client_manager.py
│   │   │           │   └── common_functions.py
│   │   │           ├── logs_and_telemetry
│   │   │           │   ├── __init__.py
│   │   │           │   ├── cluster_metrics_tools.py
│   │   │           │   ├── list_customer_iam_access.py
│   │   │           │   └── metric_config.py
│   │   │           ├── mutate_cluster
│   │   │           │   ├── __init__.py
│   │   │           │   ├── batch_associate_scram_secret.py
│   │   │           │   ├── batch_disassociate_scram_secret.py
│   │   │           │   ├── create_cluster_v2.py
│   │   │           │   ├── put_cluster_policy.py
│   │   │           │   ├── reboot_broker.py
│   │   │           │   ├── update_broker_count.py
│   │   │           │   ├── update_broker_storage.py
│   │   │           │   ├── update_broker_type.py
│   │   │           │   ├── update_cluster_configuration.py
│   │   │           │   ├── update_monitoring.py
│   │   │           │   └── update_security.py
│   │   │           ├── mutate_config
│   │   │           │   ├── __init__.py
│   │   │           │   ├── create_configuration.py
│   │   │           │   ├── tag_resource.py
│   │   │           │   ├── untag_resource.py
│   │   │           │   └── update_configuration.py
│   │   │           ├── mutate_vpc
│   │   │           │   ├── __init__.py
│   │   │           │   ├── create_vpc_connection.py
│   │   │           │   ├── delete_vpc_connection.py
│   │   │           │   └── reject_client_vpc_connection.py
│   │   │           ├── read_cluster
│   │   │           │   ├── __init__.py
│   │   │           │   ├── describe_cluster_operation.py
│   │   │           │   ├── describe_cluster.py
│   │   │           │   ├── get_bootstrap_brokers.py
│   │   │           │   ├── get_cluster_policy.py
│   │   │           │   ├── get_compatible_kafka_versions.py
│   │   │           │   ├── list_client_vpc_connections.py
│   │   │           │   ├── list_cluster_operations.py
│   │   │           │   ├── list_nodes.py
│   │   │           │   └── list_scram_secrets.py
│   │   │           ├── read_config
│   │   │           │   ├── __init__.py
│   │   │           │   ├── describe_configuration_revision.py
│   │   │           │   ├── describe_configuration.py
│   │   │           │   ├── list_configuration_revisions.py
│   │   │           │   └── list_tags_for_resource.py
│   │   │           ├── read_global
│   │   │           │   ├── __init__.py
│   │   │           │   ├── list_clusters.py
│   │   │           │   ├── list_configurations.py
│   │   │           │   ├── list_kafka_versions.py
│   │   │           │   └── list_vpc_connections.py
│   │   │           ├── read_vpc
│   │   │           │   ├── __init__.py
│   │   │           │   └── describe_vpc_connection.py
│   │   │           └── static_tools
│   │   │               ├── __init__.py
│   │   │               └── cluster_best_practices.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_client_manager.py
│   │   │   ├── test_cluster_metrics_tools.py
│   │   │   ├── test_common_functions.py
│   │   │   ├── test_create_cluster_v2.py
│   │   │   ├── test_create_configuration.py
│   │   │   ├── test_create_vpc_connection.py
│   │   │   ├── test_delete_vpc_connection.py
│   │   │   ├── test_describe_cluster_operation.py
│   │   │   ├── test_describe_cluster.py
│   │   │   ├── test_describe_configuration_revision.py
│   │   │   ├── test_describe_configuration.py
│   │   │   ├── test_describe_vpc_connection.py
│   │   │   ├── test_get_bootstrap_brokers.py
│   │   │   ├── test_get_cluster_policy.py
│   │   │   ├── test_get_compatible_kafka_versions.py
│   │   │   ├── test_init.py
│   │   │   ├── test_list_client_vpc_connections.py
│   │   │   ├── test_list_cluster_operations.py
│   │   │   ├── test_list_clusters.py
│   │   │   ├── test_list_configuration_revisions.py
│   │   │   ├── test_list_configurations.py
│   │   │   ├── test_list_customer_iam_access.py
│   │   │   ├── test_list_kafka_versions.py
│   │   │   ├── test_list_nodes.py
│   │   │   ├── test_list_scram_secrets.py
│   │   │   ├── test_list_tags_for_resource.py
│   │   │   ├── test_list_vpc_connections.py
│   │   │   ├── test_logs_and_telemetry.py
│   │   │   ├── test_main.py
│   │   │   ├── test_mutate_cluster_init.py
│   │   │   ├── test_mutate_cluster_success_cases.py
│   │   │   ├── test_mutate_cluster.py
│   │   │   ├── test_mutate_config_init.py
│   │   │   ├── test_mutate_vpc_init.py
│   │   │   ├── test_read_cluster_init_updated.py
│   │   │   ├── test_read_cluster_init.py
│   │   │   ├── test_read_config_init.py
│   │   │   ├── test_read_global_init.py
│   │   │   ├── test_read_vpc_init.py
│   │   │   ├── test_reject_client_vpc_connection.py
│   │   │   ├── test_server.py
│   │   │   ├── test_static_tools_init.py
│   │   │   ├── test_tag_resource.py
│   │   │   ├── test_tool_descriptions.py
│   │   │   ├── test_untag_resource.py
│   │   │   └── test_update_configuration.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-pricing-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_pricing_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── cdk_analyzer.py
│   │   │       ├── consts.py
│   │   │       ├── helpers.py
│   │   │       ├── models.py
│   │   │       ├── pricing_client.py
│   │   │       ├── pricing_transformer.py
│   │   │       ├── report_generator.py
│   │   │       ├── server.py
│   │   │       ├── static
│   │   │       │   ├── __init__.py
│   │   │       │   ├── COST_REPORT_TEMPLATE.md
│   │   │       │   └── patterns
│   │   │       │       ├── __init__.py
│   │   │       │       └── BEDROCK.md
│   │   │       └── terraform_analyzer.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_cdk_analyzer.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_pricing_client.py
│   │   │   ├── test_pricing_transformer.py
│   │   │   ├── test_report_generator.py
│   │   │   ├── test_server.py
│   │   │   └── test_terraform_analyzer.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── aws-serverless-mcp-server
│   │   ├── .pre-commit.config.yaml
│   │   ├── .python-version
│   │   ├── .secrets.baseline
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_serverless_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── models.py
│   │   │       ├── resources
│   │   │       │   ├── __init__.py
│   │   │       │   ├── deployment_details.py
│   │   │       │   ├── deployment_list.py
│   │   │       │   ├── template_details.py
│   │   │       │   └── template_list.py
│   │   │       ├── server.py
│   │   │       ├── template
│   │   │       │   ├── __init__.py
│   │   │       │   ├── registry.py
│   │   │       │   ├── renderer.py
│   │   │       │   └── templates
│   │   │       │       ├── backend.j2
│   │   │       │       ├── frontend.j2
│   │   │       │       ├── fullstack.j2
│   │   │       │       └── README.md
│   │   │       ├── templates
│   │   │       │   ├── __init__.py
│   │   │       │   └── iam_policies.py
│   │   │       ├── tools
│   │   │       │   ├── common
│   │   │       │   │   └── base_tool.py
│   │   │       │   ├── esm
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── esm_diagnosis.py
│   │   │       │   │   ├── esm_guidance.py
│   │   │       │   │   ├── esm_recommend.py
│   │   │       │   │   └── secure_esm_guidance.py
│   │   │       │   ├── guidance
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── deploy_serverless_app_help.py
│   │   │       │   │   ├── get_iac_guidance.py
│   │   │       │   │   ├── get_lambda_event_schemas.py
│   │   │       │   │   ├── get_lambda_guidance.py
│   │   │       │   │   └── get_serverless_templates.py
│   │   │       │   ├── poller
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── esm_diagnosis.py
│   │   │       │   │   ├── esm_guidance.py
│   │   │       │   │   └── esm_recommend.py
│   │   │       │   ├── sam
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── sam_build.py
│   │   │       │   │   ├── sam_deploy.py
│   │   │       │   │   ├── sam_init.py
│   │   │       │   │   ├── sam_local_invoke.py
│   │   │       │   │   └── sam_logs.py
│   │   │       │   ├── schemas
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── describe_schema.py
│   │   │       │   │   ├── list_registries.py
│   │   │       │   │   └── search_schema.py
│   │   │       │   └── webapps
│   │   │       │       ├── __init__.py
│   │   │       │       ├── configure_domain.py
│   │   │       │       ├── deploy_webapp.py
│   │   │       │       ├── get_metrics.py
│   │   │       │       ├── update_webapp_frontend.py
│   │   │       │       ├── utils
│   │   │       │       │   ├── deploy_service.py
│   │   │       │       │   ├── frontend_uploader.py
│   │   │       │       │   └── startup_script_generator.py
│   │   │       │       └── webapp_deployment_help.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── aws_client_helper.py
│   │   │           ├── cloudformation.py
│   │   │           ├── const.py
│   │   │           ├── data_scrubber.py
│   │   │           ├── deployment_manager.py
│   │   │           ├── github.py
│   │   │           └── process.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_cloudformation.py
│   │   │   ├── test_configure_domain.py
│   │   │   ├── test_data_scrubber.py
│   │   │   ├── test_deploy_serverless_app_help.py
│   │   │   ├── test_deploy_service.py
│   │   │   ├── test_deploy_webapp.py
│   │   │   ├── test_deployment_details.py
│   │   │   ├── test_deployment_help.py
│   │   │   ├── test_deployment_list.py
│   │   │   ├── test_deployment_manager.py
│   │   │   ├── test_esm_diagnosis.py
│   │   │   ├── test_esm_guidance.py
│   │   │   ├── test_esm_recommend.py
│   │   │   ├── test_frontend_uploader.py
│   │   │   ├── test_get_iac_guidance.py
│   │   │   ├── test_get_lambda_event_schemas.py
│   │   │   ├── test_get_lambda_guidance.py
│   │   │   ├── test_get_metrics.py
│   │   │   ├── test_get_serverless_templates.py
│   │   │   ├── test_github.py
│   │   │   ├── test_iam_policies.py
│   │   │   ├── test_models.py
│   │   │   ├── test_process.py
│   │   │   ├── test_sam_build.py
│   │   │   ├── test_sam_deploy.py
│   │   │   ├── test_sam_init.py
│   │   │   ├── test_sam_local_invoke.py
│   │   │   ├── test_sam_logs.py
│   │   │   ├── test_schemas.py
│   │   │   ├── test_secure_esm_guidance.py
│   │   │   ├── test_server.py
│   │   │   ├── test_startup_script_generator.py
│   │   │   ├── test_template_details.py
│   │   │   ├── test_template_list.py
│   │   │   ├── test_template_registry.py
│   │   │   ├── test_template_renderer.py
│   │   │   └── test_update_webapp_frontend.py
│   │   └── uv.lock
│   ├── aws-support-mcp-server
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── aws_support_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── client.py
│   │   │       ├── consts.py
│   │   │       ├── debug_helper.py
│   │   │       ├── errors.py
│   │   │       ├── formatters.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftests.py
│   │   │   ├── test_aws_support_mcp_server.py
│   │   │   └── test_models.py
│   │   └── uv.lock
│   ├── bedrock-kb-retrieval-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── bedrock_kb_retrieval_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── knowledgebases
│   │   │       │   ├── __init__.py
│   │   │       │   ├── clients.py
│   │   │       │   ├── discovery.py
│   │   │       │   └── retrieval.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_clients.py
│   │   │   ├── test_discovery.py
│   │   │   ├── test_env_config.py
│   │   │   ├── test_models.py
│   │   │   ├── test_retrieval.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── billing-cost-management-mcp-server
│   │   ├── __init__.py
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── billing_cost_management_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── models.py
│   │   │       ├── prompts
│   │   │       │   ├── __init__.py
│   │   │       │   ├── decorator.py
│   │   │       │   ├── graviton_migration.py
│   │   │       │   ├── README.md
│   │   │       │   ├── savings_plans.py
│   │   │       │   └── types.py
│   │   │       ├── server.py
│   │   │       ├── templates
│   │   │       │   └── recommendation_templates
│   │   │       │       ├── ebs_volume.template
│   │   │       │       ├── ec2_asg.template
│   │   │       │       ├── ec2_instance.template
│   │   │       │       ├── ecs_service.template
│   │   │       │       ├── idle.template
│   │   │       │       ├── lambda_function.template
│   │   │       │       ├── rds_database.template
│   │   │       │       ├── reserved_instances.template
│   │   │       │       └── savings_plans.template
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── aws_pricing_operations.py
│   │   │       │   ├── aws_pricing_tools.py
│   │   │       │   ├── bcm_pricing_calculator_tools.py
│   │   │       │   ├── budget_tools.py
│   │   │       │   ├── compute_optimizer_tools.py
│   │   │       │   ├── cost_anomaly_tools.py
│   │   │       │   ├── cost_comparison_tools.py
│   │   │       │   ├── cost_explorer_operations.py
│   │   │       │   ├── cost_explorer_tools.py
│   │   │       │   ├── cost_optimization_hub_helpers.py
│   │   │       │   ├── cost_optimization_hub_tools.py
│   │   │       │   ├── free_tier_usage_tools.py
│   │   │       │   ├── recommendation_details_tools.py
│   │   │       │   ├── ri_performance_tools.py
│   │   │       │   ├── sp_performance_tools.py
│   │   │       │   ├── storage_lens_tools.py
│   │   │       │   └── unified_sql_tools.py
│   │   │       └── utilities
│   │   │           ├── __init__.py
│   │   │           ├── aws_service_base.py
│   │   │           ├── constants.py
│   │   │           ├── logging_utils.py
│   │   │           └── sql_utils.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── requirements.txt
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── prompts
│   │   │   │   ├── __init__.py
│   │   │   │   └── test_prompts.py
│   │   │   ├── README.md
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   ├── tools
│   │   │   │   ├── __init__.py
│   │   │   │   ├── fixtures.py
│   │   │   │   ├── test_aws_bcm_pricing_calculator_tools.py
│   │   │   │   ├── test_aws_pricing_tools.py
│   │   │   │   ├── test_budget_tools.py
│   │   │   │   ├── test_compute_optimizer_tools.py
│   │   │   │   ├── test_cost_anomaly_tools_enhanced.py
│   │   │   │   ├── test_cost_anomaly_tools.py
│   │   │   │   ├── test_cost_comparison_tools.py
│   │   │   │   ├── test_cost_explorer_operations.py
│   │   │   │   ├── test_cost_explorer_tools.py
│   │   │   │   ├── test_cost_optimization_hub_helpers.py
│   │   │   │   ├── test_cost_optimization_hub_tools.py
│   │   │   │   ├── test_free_tier_usage_tools_new.py
│   │   │   │   ├── test_recommendation_details_tools.py
│   │   │   │   ├── test_ri_performance_tools.py
│   │   │   │   ├── test_sp_performance_tools.py
│   │   │   │   ├── test_storage_lens_tools.py
│   │   │   │   └── test_unified_sql_tools.py
│   │   │   └── utilities
│   │   │       ├── test_aws_service_base.py
│   │   │       └── test_sql_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── ccapi-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── ccapi_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_client.py
│   │   │       ├── cloud_control_utils.py
│   │   │       ├── context.py
│   │   │       ├── errors.py
│   │   │       ├── iac_generator.py
│   │   │       ├── impl
│   │   │       │   ├── __init__.py
│   │   │       │   ├── tools
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── explanation.py
│   │   │       │   │   ├── infrastructure_generation.py
│   │   │       │   │   ├── resource_operations.py
│   │   │       │   │   ├── security_scanning.py
│   │   │       │   │   └── session_management.py
│   │   │       │   └── utils
│   │   │       │       ├── __init__.py
│   │   │       │       └── validation.py
│   │   │       ├── infrastructure_generator.py
│   │   │       ├── models
│   │   │       │   ├── __init__.py
│   │   │       │   └── models.py
│   │   │       ├── schema_manager.py
│   │   │       ├── server.py
│   │   │       └── static
│   │   │           └── __init__.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_aws_client.py
│   │   │   ├── test_checkov_install.py
│   │   │   ├── test_cloud_control_utils.py
│   │   │   ├── test_context.py
│   │   │   ├── test_errors.py
│   │   │   ├── test_explanation.py
│   │   │   ├── test_iac_generator.py
│   │   │   ├── test_infrastructure_generation.py
│   │   │   ├── test_infrastructure_generator.py
│   │   │   ├── test_models.py
│   │   │   ├── test_resource_operations.py
│   │   │   ├── test_schema_manager.py
│   │   │   ├── test_security_scanning.py
│   │   │   ├── test_server.py
│   │   │   ├── test_session_management.py
│   │   │   └── test_validation.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cdk-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cdk_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── core
│   │   │       │   ├── __init__.py
│   │   │       │   ├── resources.py
│   │   │       │   ├── search_utils.py
│   │   │       │   ├── server.py
│   │   │       │   └── tools.py
│   │   │       ├── data
│   │   │       │   ├── __init__.py
│   │   │       │   ├── cdk_nag_parser.py
│   │   │       │   ├── construct_descriptions.py
│   │   │       │   ├── genai_cdk_loader.py
│   │   │       │   ├── lambda_layer_parser.py
│   │   │       │   ├── lambda_powertools_loader.py
│   │   │       │   ├── schema_generator.py
│   │   │       │   └── solutions_constructs_parser.py
│   │   │       ├── server.py
│   │   │       └── static
│   │   │           ├── __init__.py
│   │   │           ├── CDK_GENERAL_GUIDANCE.md
│   │   │           ├── CDK_NAG_GUIDANCE.md
│   │   │           └── lambda_powertools
│   │   │               ├── bedrock.md
│   │   │               ├── cdk.md
│   │   │               ├── dependencies.md
│   │   │               ├── index.md
│   │   │               ├── insights.md
│   │   │               ├── logging.md
│   │   │               ├── metrics.md
│   │   │               └── tracing.md
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── core
│   │   │   │   ├── test_resources_enhanced.py
│   │   │   │   ├── test_resources.py
│   │   │   │   ├── test_search_utils.py
│   │   │   │   ├── test_server.py
│   │   │   │   └── test_tools.py
│   │   │   └── data
│   │   │       ├── test_cdk_nag_parser.py
│   │   │       ├── test_genai_cdk_loader.py
│   │   │       ├── test_lambda_powertools_loader.py
│   │   │       ├── test_schema_generator.py
│   │   │       └── test_solutions_constructs_parser.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cfn-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cfn_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_client.py
│   │   │       ├── cloud_control_utils.py
│   │   │       ├── context.py
│   │   │       ├── errors.py
│   │   │       ├── iac_generator.py
│   │   │       ├── schema_manager.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_aws_client.py
│   │   │   ├── test_cloud_control_utils.py
│   │   │   ├── test_errors.py
│   │   │   ├── test_iac_generator.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_schema_manager.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cloudtrail-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cloudtrail_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       └── tools.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   └── test_tools.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cloudwatch-applicationsignals-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cloudwatch_applicationsignals_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── audit_presentation_utils.py
│   │   │       ├── audit_utils.py
│   │   │       ├── aws_clients.py
│   │   │       ├── canary_utils.py
│   │   │       ├── enablement_guides
│   │   │       │   └── templates
│   │   │       │       └── ec2
│   │   │       │           └── ec2-python-enablement.md
│   │   │       ├── enablement_tools.py
│   │   │       ├── server.py
│   │   │       ├── service_audit_utils.py
│   │   │       ├── service_tools.py
│   │   │       ├── sli_report_client.py
│   │   │       ├── slo_tools.py
│   │   │       ├── trace_tools.py
│   │   │       └── utils.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── evals
│   │   │   ├── __init__.py
│   │   │   ├── __main__.py
│   │   │   ├── core
│   │   │   │   ├── __init__.py
│   │   │   │   ├── captor.py
│   │   │   │   ├── conversation_runner.py
│   │   │   │   ├── eval_config.py
│   │   │   │   ├── eval_mcp_server_wrapper.py
│   │   │   │   ├── eval_runner.py
│   │   │   │   ├── file_tools.py
│   │   │   │   ├── llm_provider.py
│   │   │   │   ├── mcp_client.py
│   │   │   │   ├── mcp_dependency_mocking_handler.py
│   │   │   │   ├── metrics_tracker.py
│   │   │   │   ├── mock_config_path_normalizer.py
│   │   │   │   ├── process_executor.py
│   │   │   │   ├── task_result.py
│   │   │   │   ├── task.py
│   │   │   │   ├── validation_prompts.py
│   │   │   │   └── validator.py
│   │   │   ├── README.md
│   │   │   ├── requirements.txt
│   │   │   └── tasks
│   │   │       ├── __init__.py
│   │   │       └── applicationsignals
│   │   │           ├── __init__.py
│   │   │           ├── base.py
│   │   │           ├── get_enablement_guide
│   │   │           │   ├── __init__.py
│   │   │           │   └── enablement_tasks.py
│   │   │           └── investigations
│   │   │               ├── __init__.py
│   │   │               ├── fixtures
│   │   │               │   ├── bug-4-list-audit-findings-all-services-all-auditors.json
│   │   │               │   ├── bug-4-list-audit-findings-all-services-default-auditors.json
│   │   │               │   ├── bug-4-list-audit-findings-document-service-and-all-auditors.json
│   │   │               │   └── bug-4-list-services.json
│   │   │               └── investigation_tasks.py
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_audit_presentation_utils.py
│   │   │   ├── test_audit_utils.py
│   │   │   ├── test_aws_profile.py
│   │   │   ├── test_canary_utils.py
│   │   │   ├── test_enablement_tools.py
│   │   │   ├── test_initialization.py
│   │   │   ├── test_server_audit_functions.py
│   │   │   ├── test_server_audit_tools.py
│   │   │   ├── test_server.py
│   │   │   ├── test_service_audit_utils.py
│   │   │   ├── test_service_tools_operations.py
│   │   │   ├── test_sli_report_client.py
│   │   │   ├── test_slo_tools.py
│   │   │   └── test_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cloudwatch-appsignals-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cloudwatch_appsignals_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── audit_presentation_utils.py
│   │   │       ├── audit_utils.py
│   │   │       ├── aws_clients.py
│   │   │       ├── canary_utils.py
│   │   │       ├── enablement_guides
│   │   │       │   └── templates
│   │   │       │       └── ec2
│   │   │       │           └── ec2-python-enablement.md
│   │   │       ├── enablement_tools.py
│   │   │       ├── server.py
│   │   │       ├── service_audit_utils.py
│   │   │       ├── service_tools.py
│   │   │       ├── sli_report_client.py
│   │   │       ├── slo_tools.py
│   │   │       ├── trace_tools.py
│   │   │       └── utils.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_audit_presentation_utils.py
│   │   │   ├── test_audit_utils.py
│   │   │   ├── test_aws_profile.py
│   │   │   ├── test_canary_utils.py
│   │   │   ├── test_enablement_tools.py
│   │   │   ├── test_initialization.py
│   │   │   ├── test_server_audit_functions.py
│   │   │   ├── test_server_audit_tools.py
│   │   │   ├── test_server.py
│   │   │   ├── test_service_audit_utils.py
│   │   │   ├── test_service_tools_operations.py
│   │   │   ├── test_sli_report_client.py
│   │   │   ├── test_slo_tools.py
│   │   │   └── test_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cloudwatch-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cloudwatch_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── cloudwatch_alarms
│   │   │       │   ├── models.py
│   │   │       │   └── tools.py
│   │   │       ├── cloudwatch_logs
│   │   │       │   ├── models.py
│   │   │       │   └── tools.py
│   │   │       ├── cloudwatch_metrics
│   │   │       │   ├── cloudformation_template_generator.py
│   │   │       │   ├── constants.py
│   │   │       │   ├── data
│   │   │       │   │   └── metric_metadata.json
│   │   │       │   ├── metric_analyzer.py
│   │   │       │   ├── metric_data_decomposer.py
│   │   │       │   ├── models.py
│   │   │       │   └── tools.py
│   │   │       ├── common.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── cloudwatch_alarms
│   │   │   │   ├── test_active_alarms.py
│   │   │   │   ├── test_alarm_history_integration.py
│   │   │   │   ├── test_alarm_history.py
│   │   │   │   └── test_alarms_error_handling.py
│   │   │   ├── cloudwatch_logs
│   │   │   │   ├── test_logs_error_handling.py
│   │   │   │   ├── test_logs_models.py
│   │   │   │   └── test_logs_server.py
│   │   │   ├── cloudwatch_metrics
│   │   │   │   ├── test_analyze_metric.py
│   │   │   │   ├── test_cloudformation_template_generator.py
│   │   │   │   ├── test_decomposer_trend.py
│   │   │   │   ├── test_metric_analyzer.py
│   │   │   │   ├── test_metrics_error_handling.py
│   │   │   │   ├── test_metrics_models.py
│   │   │   │   ├── test_metrics_server.py
│   │   │   │   ├── test_seasonal_detector.py
│   │   │   │   ├── test_seasonality_enum.py
│   │   │   │   ├── test_utils.py
│   │   │   │   └── test_validation_error.py
│   │   │   ├── test_common_and_server.py
│   │   │   ├── test_init.py
│   │   │   └── test_main.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── code-doc-gen-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── code_doc_gen_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── doc_generator.py
│   │   │           ├── models.py
│   │   │           ├── repomix_manager.py
│   │   │           └── templates.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_doc_generator_edge_cases.py
│   │   │   ├── test_doc_generator.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_repomix_manager_scenarios.py
│   │   │   ├── test_repomix_manager.py
│   │   │   ├── test_repomix_statistics.py
│   │   │   ├── test_server_extended.py
│   │   │   ├── test_server.py
│   │   │   └── test_templates.py
│   │   └── uv.lock
│   ├── core-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── core_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       └── static
│   │   │           ├── __init__.py
│   │   │           └── PROMPT_UNDERSTANDING.md
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_response_types.py
│   │   │   ├── test_server.py
│   │   │   └── test_static.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── cost-explorer-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── cost_explorer_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── comparison_handler.py
│   │   │       ├── constants.py
│   │   │       ├── cost_usage_handler.py
│   │   │       ├── forecasting_handler.py
│   │   │       ├── helpers.py
│   │   │       ├── metadata_handler.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       └── utility_handler.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_comparison_handler.py
│   │   │   ├── test_cost_usage_handler.py
│   │   │   ├── test_forecasting_handler.py
│   │   │   ├── test_helpers.py
│   │   │   ├── test_metadata_handler.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   └── test_utility_handler.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── document-loader-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   ├── document_loader_mcp_server
│   │   │   │   ├── __init__.py
│   │   │   │   └── server.py
│   │   │   └── py.typed
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_document_parsing.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── documentdb-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   └── documentdb_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── analytic_tools.py
│   │   │       ├── config.py
│   │   │       ├── connection_tools.py
│   │   │       ├── db_management_tools.py
│   │   │       ├── query_tools.py
│   │   │       ├── server.py
│   │   │       └── write_tools.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_analytic_tools.py
│   │   │   ├── test_connection_tools.py
│   │   │   ├── test_db_management_tools.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_query_tools.py
│   │   │   └── test_write_tools.py
│   │   └── uv.lock
│   ├── dynamodb-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── dynamodb_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common.py
│   │   │       ├── database_analysis_queries.py
│   │   │       ├── database_analyzers.py
│   │   │       ├── markdown_formatter.py
│   │   │       ├── prompts
│   │   │       │   └── dynamodb_architect.md
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── evals
│   │   │   │   ├── dynamic_evaluators.py
│   │   │   │   ├── evaluation_registry.py
│   │   │   │   ├── logging_config.py
│   │   │   │   ├── multiturn_evaluator.py
│   │   │   │   ├── README.md
│   │   │   │   ├── scenarios.py
│   │   │   │   └── test_dspy_evals.py
│   │   │   ├── test_dynamodb_server.py
│   │   │   ├── test_markdown_formatter.py
│   │   │   └── test_source_db_integration.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── ecs-mcp-server
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── ecs_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── api
│   │   │       │   ├── __init__.py
│   │   │       │   ├── containerize.py
│   │   │       │   ├── delete.py
│   │   │       │   ├── ecs_troubleshooting.py
│   │   │       │   ├── infrastructure.py
│   │   │       │   ├── resource_management.py
│   │   │       │   ├── status.py
│   │   │       │   └── troubleshooting_tools
│   │   │       │       ├── __init__.py
│   │   │       │       ├── detect_image_pull_failures.py
│   │   │       │       ├── fetch_cloudformation_status.py
│   │   │       │       ├── fetch_network_configuration.py
│   │   │       │       ├── fetch_service_events.py
│   │   │       │       ├── fetch_task_failures.py
│   │   │       │       ├── fetch_task_logs.py
│   │   │       │       ├── get_ecs_troubleshooting_guidance.py
│   │   │       │       └── utils.py
│   │   │       ├── main.py
│   │   │       ├── modules
│   │   │       │   ├── __init__.py
│   │   │       │   ├── aws_knowledge_proxy.py
│   │   │       │   ├── containerize.py
│   │   │       │   ├── delete.py
│   │   │       │   ├── deployment_status.py
│   │   │       │   ├── infrastructure.py
│   │   │       │   ├── resource_management.py
│   │   │       │   └── troubleshooting.py
│   │   │       ├── templates
│   │   │       │   ├── ecr_infrastructure.json
│   │   │       │   └── ecs_infrastructure.json
│   │   │       └── utils
│   │   │           ├── arn_parser.py
│   │   │           ├── aws.py
│   │   │           ├── config.py
│   │   │           ├── docker.py
│   │   │           ├── security.py
│   │   │           ├── templates.py
│   │   │           └── time_utils.py
│   │   ├── DEVELOPMENT.md
│   │   ├── pyproject.toml
│   │   ├── pyrightconfig.json
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── integ
│   │   │   │   └── mcp-inspector
│   │   │   │       ├── .gitignore
│   │   │   │       ├── README.md
│   │   │   │       ├── run-tests.sh
│   │   │   │       └── scenarios
│   │   │   │           ├── 01_comprehensive_troubleshooting
│   │   │   │           │   ├── 01_create.sh
│   │   │   │           │   ├── 02_validate.sh
│   │   │   │           │   ├── 03_cleanup.sh
│   │   │   │           │   ├── description.txt
│   │   │   │           │   └── utils
│   │   │   │           │       ├── mcp_helpers.sh
│   │   │   │           │       └── validation_helpers.sh
│   │   │   │           └── 02_test_knowledge_proxy_tools
│   │   │   │               ├── 01_create.sh
│   │   │   │               ├── 02_validate.sh
│   │   │   │               ├── 03_cleanup.sh
│   │   │   │               ├── description.txt
│   │   │   │               └── utils
│   │   │   │                   ├── knowledge_validation_helpers.sh
│   │   │   │                   └── mcp_knowledge_helpers.sh
│   │   │   ├── llm_testing
│   │   │   │   ├── invalid_cfn_template.yaml
│   │   │   │   ├── README.md
│   │   │   │   ├── run_tests.sh
│   │   │   │   ├── scenarios
│   │   │   │   │   ├── 01_cloudformation_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 04_evaluation.md
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   ├── 02_service_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 04_evaluation.md
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   ├── 03_task_exit_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 04_evaluation.md
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   ├── 04_network_configuration_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   ├── 05_resource_constraint_failure
│   │   │   │   │   │   ├── 01_create.sh
│   │   │   │   │   │   ├── 02_validate.sh
│   │   │   │   │   │   ├── 03_prompts.txt
│   │   │   │   │   │   ├── 05_cleanup.sh
│   │   │   │   │   │   └── description.txt
│   │   │   │   │   └── 06_load_balancer_failure
│   │   │   │   │       ├── 01_create.sh
│   │   │   │   │       ├── 02_validate.sh
│   │   │   │   │       ├── 03_prompts.txt
│   │   │   │   │       ├── 05_cleanup.sh
│   │   │   │   │       └── description.txt
│   │   │   │   ├── SCRIPT_IMPROVEMENTS.md
│   │   │   │   └── utils
│   │   │   │       ├── aws_helpers.sh
│   │   │   │       └── evaluation_template.md
│   │   │   └── unit
│   │   │       ├── __init__.py
│   │   │       ├── api
│   │   │       │   ├── conftest.py
│   │   │       │   ├── test_delete_api.py
│   │   │       │   ├── test_ecs_troubleshooting.py
│   │   │       │   ├── test_resource_management_api.py
│   │   │       │   └── troubleshooting_tools
│   │   │       │       └── test_fetch_network_configuration.py
│   │   │       ├── conftest.py
│   │   │       ├── modules
│   │   │       │   ├── test_aws_knowledge_proxy.py
│   │   │       │   └── test_resource_management_module.py
│   │   │       ├── test_aws_role_utils.py
│   │   │       ├── test_aws_utils.py
│   │   │       ├── test_containerize.py
│   │   │       ├── test_delete.py
│   │   │       ├── test_docker_utils.py
│   │   │       ├── test_docker_with_role.py
│   │   │       ├── test_image_pull_failure_extended.py
│   │   │       ├── test_image_pull_failure.py
│   │   │       ├── test_infrastructure_role.py
│   │   │       ├── test_infrastructure.py
│   │   │       ├── test_integration.py
│   │   │       ├── test_main.py
│   │   │       ├── test_resource_management_api_operation.py
│   │   │       ├── test_resource_management_tool.py
│   │   │       ├── test_resource_management.py
│   │   │       ├── test_security_integration.py
│   │   │       ├── test_status_pytest.py
│   │   │       ├── test_status.py
│   │   │       ├── troubleshooting_tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── conftest.py
│   │   │       │   ├── test_detect_image_pull_failures.py
│   │   │       │   ├── test_fetch_cloudformation_status.py
│   │   │       │   ├── test_fetch_service_events.py
│   │   │       │   ├── test_fetch_task_failures.py
│   │   │       │   ├── test_fetch_task_logs.py
│   │   │       │   ├── test_get_ecs_troubleshooting_guidance.py
│   │   │       │   ├── test_is_ecr_image_security.py
│   │   │       │   └── test_utils.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── async_test_utils.py
│   │   │           ├── test_arn_parser.py
│   │   │           ├── test_config.py
│   │   │           ├── test_docker.py
│   │   │           ├── test_response_sanitization.py
│   │   │           ├── test_security_extended.py
│   │   │           ├── test_security.py
│   │   │           ├── test_templates.py
│   │   │           └── test_time_utils.py
│   │   └── uv.lock
│   ├── eks-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── eks_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_helper.py
│   │   │       ├── cloudwatch_handler.py
│   │   │       ├── cloudwatch_metrics_guidance_handler.py
│   │   │       ├── consts.py
│   │   │       ├── data
│   │   │       │   └── eks_cloudwatch_metrics_guidance.json
│   │   │       ├── eks_kb_handler.py
│   │   │       ├── eks_stack_handler.py
│   │   │       ├── iam_handler.py
│   │   │       ├── insights_handler.py
│   │   │       ├── k8s_apis.py
│   │   │       ├── k8s_client_cache.py
│   │   │       ├── k8s_handler.py
│   │   │       ├── logging_helper.py
│   │   │       ├── models.py
│   │   │       ├── scripts
│   │   │       │   └── update_eks_cloudwatch_metrics_guidance.py
│   │   │       ├── server.py
│   │   │       ├── templates
│   │   │       │   ├── eks-templates
│   │   │       │   │   └── eks-with-vpc.yaml
│   │   │       │   └── k8s-templates
│   │   │       │       ├── deployment.yaml
│   │   │       │       └── service.yaml
│   │   │       └── vpc_config_handler.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_aws_helper.py
│   │   │   ├── test_cloudwatch_handler.py
│   │   │   ├── test_cloudwatch_metrics_guidance_handler.py
│   │   │   ├── test_eks_kb_handler.py
│   │   │   ├── test_eks_stack_handler.py
│   │   │   ├── test_iam_handler.py
│   │   │   ├── test_init.py
│   │   │   ├── test_insights_handler.py
│   │   │   ├── test_k8s_apis.py
│   │   │   ├── test_k8s_client_cache.py
│   │   │   ├── test_k8s_handler.py
│   │   │   ├── test_logging_helper.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   └── test_vpc_config_handler.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── elasticache-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── elasticache_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common
│   │   │       │   ├── __init__.py
│   │   │       │   ├── connection.py
│   │   │       │   ├── decorators.py
│   │   │       │   └── server.py
│   │   │       ├── context.py
│   │   │       ├── main.py
│   │   │       └── tools
│   │   │           ├── __init__.py
│   │   │           ├── cc
│   │   │           │   ├── __init__.py
│   │   │           │   ├── connect.py
│   │   │           │   ├── create.py
│   │   │           │   ├── delete.py
│   │   │           │   ├── describe.py
│   │   │           │   ├── modify.py
│   │   │           │   ├── parsers.py
│   │   │           │   └── processors.py
│   │   │           ├── ce
│   │   │           │   ├── __init__.py
│   │   │           │   └── get_cost_and_usage.py
│   │   │           ├── cw
│   │   │           │   ├── __init__.py
│   │   │           │   └── get_metric_statistics.py
│   │   │           ├── cwlogs
│   │   │           │   ├── __init__.py
│   │   │           │   ├── create_log_group.py
│   │   │           │   ├── describe_log_groups.py
│   │   │           │   ├── describe_log_streams.py
│   │   │           │   ├── filter_log_events.py
│   │   │           │   └── get_log_events.py
│   │   │           ├── firehose
│   │   │           │   ├── __init__.py
│   │   │           │   └── list_delivery_streams.py
│   │   │           ├── misc
│   │   │           │   ├── __init__.py
│   │   │           │   ├── batch_apply_update_action.py
│   │   │           │   ├── batch_stop_update_action.py
│   │   │           │   ├── describe_cache_engine_versions.py
│   │   │           │   ├── describe_engine_default_parameters.py
│   │   │           │   ├── describe_events.py
│   │   │           │   └── describe_service_updates.py
│   │   │           ├── rg
│   │   │           │   ├── __init__.py
│   │   │           │   ├── complete_migration.py
│   │   │           │   ├── connect.py
│   │   │           │   ├── create.py
│   │   │           │   ├── delete.py
│   │   │           │   ├── describe.py
│   │   │           │   ├── modify.py
│   │   │           │   ├── parsers.py
│   │   │           │   ├── processors.py
│   │   │           │   ├── start_migration.py
│   │   │           │   └── test_migration.py
│   │   │           └── serverless
│   │   │               ├── __init__.py
│   │   │               ├── connect.py
│   │   │               ├── create.py
│   │   │               ├── delete.py
│   │   │               ├── describe.py
│   │   │               ├── models.py
│   │   │               └── modify.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_connection.py
│   │   │   ├── test_decorators.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── tools
│   │   │       ├── cc
│   │   │       │   ├── __init__.py
│   │   │       │   ├── test_connect_additional.py
│   │   │       │   ├── test_connect_coverage_additional.py
│   │   │       │   ├── test_connect_coverage.py
│   │   │       │   ├── test_connect.py
│   │   │       │   ├── test_create_additional.py
│   │   │       │   ├── test_create.py
│   │   │       │   ├── test_delete.py
│   │   │       │   ├── test_describe.py
│   │   │       │   ├── test_modify.py
│   │   │       │   ├── test_parsers.py
│   │   │       │   └── test_processors.py
│   │   │       ├── ce
│   │   │       │   ├── __init__.py
│   │   │       │   └── test_get_cost_and_usage.py
│   │   │       ├── cw
│   │   │       │   └── test_get_metric_statistics.py
│   │   │       ├── cwlogs
│   │   │       │   ├── __init__.py
│   │   │       │   ├── test_create_log_group.py
│   │   │       │   ├── test_describe_log_groups.py
│   │   │       │   ├── test_describe_log_streams.py
│   │   │       │   ├── test_filter_log_events.py
│   │   │       │   └── test_get_log_events.py
│   │   │       ├── firehose
│   │   │       │   └── test_list_delivery_streams.py
│   │   │       ├── misc
│   │   │       │   ├── __init__.py
│   │   │       │   ├── test_batch_apply_update_action.py
│   │   │       │   ├── test_batch_stop_update_action.py
│   │   │       │   ├── test_describe_cache_engine_versions.py
│   │   │       │   ├── test_describe_engine_default_parameters.py
│   │   │       │   ├── test_describe_events.py
│   │   │       │   └── test_describe_service_updates.py
│   │   │       ├── rg
│   │   │       │   ├── __init__.py
│   │   │       │   ├── test_complete_migration.py
│   │   │       │   ├── test_connect_additional.py
│   │   │       │   ├── test_connect_coverage_additional.py
│   │   │       │   ├── test_connect_optional_fields.py
│   │   │       │   ├── test_connect_partial_coverage.py
│   │   │       │   ├── test_connect.py
│   │   │       │   ├── test_create.py
│   │   │       │   ├── test_delete.py
│   │   │       │   ├── test_describe.py
│   │   │       │   ├── test_modify.py
│   │   │       │   ├── test_parsers.py
│   │   │       │   ├── test_processors.py
│   │   │       │   ├── test_start_migration.py
│   │   │       │   └── test_test_migration.py
│   │   │       └── serverless
│   │   │           ├── test_connect_additional.py
│   │   │           ├── test_connect_coverage_additional.py
│   │   │           ├── test_connect_optional_fields.py
│   │   │           ├── test_connect.py
│   │   │           ├── test_create.py
│   │   │           ├── test_delete.py
│   │   │           ├── test_describe.py
│   │   │           └── test_modify.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── finch-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── finch_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── build.py
│   │   │           ├── common.py
│   │   │           ├── ecr.py
│   │   │           ├── push.py
│   │   │           └── vm.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── test_cli_flags.py
│   │   │   ├── test_logging_configuration.py
│   │   │   ├── test_server.py
│   │   │   ├── test_utils_build.py
│   │   │   ├── test_utils_common.py
│   │   │   ├── test_utils_ecr.py
│   │   │   ├── test_utils_push.py
│   │   │   └── test_utils_vm.py
│   │   └── uv.lock
│   ├── frontend-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── frontend_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── server.py
│   │   │       ├── static
│   │   │       │   └── react
│   │   │       │       ├── essential-knowledge.md
│   │   │       │       └── troubleshooting.md
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           └── file_utils.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_file_utils.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   └── uv.lock
│   ├── git-repo-research-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── git_repo_research_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── defaults.py
│   │   │       ├── embeddings.py
│   │   │       ├── github_search.py
│   │   │       ├── indexer.py
│   │   │       ├── models.py
│   │   │       ├── repository.py
│   │   │       ├── search.py
│   │   │       ├── server.py
│   │   │       └── utils.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_errors_repository.py
│   │   │   ├── test_github_search_edge_cases.py
│   │   │   ├── test_graphql_github_search.py
│   │   │   ├── test_local_repository.py
│   │   │   ├── test_repository_utils.py
│   │   │   ├── test_rest_github_search.py
│   │   │   ├── test_search.py
│   │   │   ├── test_server.py
│   │   │   └── test_url_repository.py
│   │   └── uv.lock
│   ├── healthlake-mcp-server
│   │   ├── .dockerignore
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── healthlake_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── fhir_operations.py
│   │   │       ├── main.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── examples
│   │   │   ├── mcp_config.json
│   │   │   └── README.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_fhir_client_comprehensive.py
│   │   │   ├── test_fhir_error_scenarios.py
│   │   │   ├── test_fhir_operations.py
│   │   │   ├── test_integration_mock_based.py
│   │   │   ├── test_main_edge_cases.py
│   │   │   ├── test_main.py
│   │   │   ├── test_mcp_integration_coverage.py
│   │   │   ├── test_models_edge_cases.py
│   │   │   ├── test_models.py
│   │   │   ├── test_readonly_mode.py
│   │   │   ├── test_server_core.py
│   │   │   ├── test_server_error_handling.py
│   │   │   ├── test_server_mcp_handlers.py
│   │   │   ├── test_server_toolhandler.py
│   │   │   └── test_server_validation.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── iam-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── iam_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_client.py
│   │   │       ├── context.py
│   │   │       ├── errors.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── DESIGN_COMPLIANCE.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── examples
│   │   │   ├── get_policy_document_example.py
│   │   │   └── inline_policy_demo.py
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── run_tests.sh
│   │   ├── tests
│   │   │   ├── test_context.py
│   │   │   ├── test_errors.py
│   │   │   ├── test_inline_policies.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── lambda-tool-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── lambda_tool_mcp_server
│   │   │       ├── __init__.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── examples
│   │   │   ├── README.md
│   │   │   └── sample_functions
│   │   │       ├── customer-create
│   │   │       │   └── app.py
│   │   │       ├── customer-id-from-email
│   │   │       │   └── app.py
│   │   │       ├── customer-info-from-id
│   │   │       │   └── app.py
│   │   │       └── template.yml
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_format_lambda_response.py
│   │   │   ├── test_integration_coverage.py
│   │   │   ├── test_integration.py
│   │   │   ├── test_register_lambda_functions.py
│   │   │   ├── test_schema_integration.py
│   │   │   ├── test_server_coverage_additional.py
│   │   │   ├── test_server_coverage.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── mcp-lambda-handler
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   └── mcp_lambda_handler
│   │   │       ├── __init__.py
│   │   │       ├── mcp_lambda_handler.py
│   │   │       ├── session.py
│   │   │       └── types.py
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   └── test_lambda_handler.py
│   │   └── uv.lock
│   ├── memcached-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── memcached_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common
│   │   │       │   ├── config.py
│   │   │       │   ├── connection.py
│   │   │       │   └── server.py
│   │   │       ├── context.py
│   │   │       ├── main.py
│   │   │       └── tools
│   │   │           └── cache.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── ELASTICACHECONNECT.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_cache_readonly.py
│   │   │   ├── test_cache.py
│   │   │   ├── test_connection.py
│   │   │   ├── test_init.py
│   │   │   └── test_main.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── mysql-mcp-server
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── mysql_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── connection
│   │   │       │   ├── __init__.py
│   │   │       │   ├── abstract_db_connection.py
│   │   │       │   ├── asyncmy_pool_connection.py
│   │   │       │   ├── db_connection_singleton.py
│   │   │       │   └── rds_data_api_connection.py
│   │   │       ├── mutable_sql_detector.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_abstract_db_connection.py
│   │   │   ├── test_asyncmy_pool_connection.py
│   │   │   ├── test_db_connection_singleton.py
│   │   │   ├── test_rds_data_api_connection.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── nova-canvas-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── nova_canvas_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       ├── novacanvas.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_models.py
│   │   │   ├── test_novacanvas.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── openapi-mcp-server
│   │   ├── .coveragerc
│   │   ├── .dockerignore
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── AUTHENTICATION.md
│   │   ├── AWS_BEST_PRACTICES.md
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── openapi_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── api
│   │   │       │   ├── __init__.py
│   │   │       │   └── config.py
│   │   │       ├── auth
│   │   │       │   ├── __init__.py
│   │   │       │   ├── api_key_auth.py
│   │   │       │   ├── auth_cache.py
│   │   │       │   ├── auth_errors.py
│   │   │       │   ├── auth_factory.py
│   │   │       │   ├── auth_protocol.py
│   │   │       │   ├── auth_provider.py
│   │   │       │   ├── base_auth.py
│   │   │       │   ├── basic_auth.py
│   │   │       │   ├── bearer_auth.py
│   │   │       │   ├── cognito_auth.py
│   │   │       │   └── register.py
│   │   │       ├── patch
│   │   │       │   └── __init__.py
│   │   │       ├── prompts
│   │   │       │   ├── __init__.py
│   │   │       │   ├── generators
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── operation_prompts.py
│   │   │       │   │   └── workflow_prompts.py
│   │   │       │   ├── models.py
│   │   │       │   └── prompt_manager.py
│   │   │       ├── server.py
│   │   │       └── utils
│   │   │           ├── __init__.py
│   │   │           ├── cache_provider.py
│   │   │           ├── config.py
│   │   │           ├── error_handler.py
│   │   │           ├── http_client.py
│   │   │           ├── metrics_provider.py
│   │   │           ├── openapi_validator.py
│   │   │           └── openapi.py
│   │   ├── CHANGELOG.md
│   │   ├── DEPLOYMENT.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── OBSERVABILITY.md
│   │   ├── pyproject.toml
│   │   ├── pyrightconfig.json
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── api
│   │   │   │   └── test_config.py
│   │   │   ├── auth
│   │   │   │   ├── test_api_key_auth.py
│   │   │   │   ├── test_auth_cache.py
│   │   │   │   ├── test_auth_errors.py
│   │   │   │   ├── test_auth_factory_caching.py
│   │   │   │   ├── test_auth_factory_coverage.py
│   │   │   │   ├── test_auth_factory.py
│   │   │   │   ├── test_auth_protocol_additional.py
│   │   │   │   ├── test_auth_protocol_boost.py
│   │   │   │   ├── test_auth_protocol_coverage.py
│   │   │   │   ├── test_auth_protocol_extended.py
│   │   │   │   ├── test_auth_protocol_improved.py
│   │   │   │   ├── test_auth_protocol.py
│   │   │   │   ├── test_auth_provider_additional.py
│   │   │   │   ├── test_base_auth_coverage.py
│   │   │   │   ├── test_base_auth.py
│   │   │   │   ├── test_basic_auth.py
│   │   │   │   ├── test_bearer_auth.py
│   │   │   │   ├── test_cognito_auth_additional_coverage.py
│   │   │   │   ├── test_cognito_auth_boost_coverage.py
│   │   │   │   ├── test_cognito_auth_client_credentials.py
│   │   │   │   ├── test_cognito_auth_coverage_boost.py
│   │   │   │   ├── test_cognito_auth_exceptions.py
│   │   │   │   ├── test_cognito_auth.py
│   │   │   │   ├── test_register_coverage.py
│   │   │   │   └── test_register.py
│   │   │   ├── prompts
│   │   │   │   ├── standalone
│   │   │   │   │   ├── test_operation_prompt.py
│   │   │   │   │   ├── test_prompt_arguments.py
│   │   │   │   │   └── test_secure_operation_prompt.py
│   │   │   │   ├── test_mcp_prompt_manager_integration.py
│   │   │   │   ├── test_mcp_prompt_manager.py
│   │   │   │   ├── test_models_dict_method.py
│   │   │   │   ├── test_operation_prompts_extended.py
│   │   │   │   ├── test_prompt_manager_additional.py
│   │   │   │   ├── test_prompt_manager_comprehensive.py
│   │   │   │   ├── test_prompt_manager_coverage.py
│   │   │   │   └── test_prompt_registration.py
│   │   │   ├── README.md
│   │   │   ├── test_api_name.py
│   │   │   ├── test_cache_coverage_89.py
│   │   │   ├── test_client.py
│   │   │   ├── test_coverage_boost.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main_extended.py
│   │   │   ├── test_main.py
│   │   │   ├── test_openapi_coverage_89.py
│   │   │   ├── test_server_auth_errors.py
│   │   │   ├── test_server_coverage_boost_2.py
│   │   │   ├── test_server_coverage_boost.py
│   │   │   ├── test_server_exception_handling.py
│   │   │   ├── test_server_extended.py
│   │   │   ├── test_server_httpx_version.py
│   │   │   ├── test_server_part1.py
│   │   │   ├── test_server_route_logging.py
│   │   │   ├── test_server_signal_handlers.py
│   │   │   ├── test_server.py
│   │   │   └── utils
│   │   │       ├── test_cache_provider.py
│   │   │       ├── test_error_handler_boost.py
│   │   │       ├── test_error_handler_extended.py
│   │   │       ├── test_error_handler_fix.py
│   │   │       ├── test_error_handler.py
│   │   │       ├── test_http_client_comprehensive.py
│   │   │       ├── test_http_client_extended.py
│   │   │       ├── test_http_client_extended2.py
│   │   │       ├── test_http_client_import_error.py
│   │   │       ├── test_http_client.py
│   │   │       ├── test_metrics_provider_decorators.py
│   │   │       ├── test_metrics_provider_extended2.py
│   │   │       ├── test_metrics_provider_prometheus.py
│   │   │       ├── test_metrics_provider.py
│   │   │       ├── test_openapi_validator.py
│   │   │       └── test_openapi.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── postgres-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── postgres_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── connection
│   │   │       │   ├── __init__.py
│   │   │       │   ├── abstract_db_connection.py
│   │   │       │   ├── db_connection_singleton.py
│   │   │       │   ├── psycopg_pool_connection.py
│   │   │       │   └── rds_api_connection.py
│   │   │       ├── mutable_sql_detector.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_psycopg_connector.py
│   │   │   ├── test_server.py
│   │   │   └── test_singleton.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── prometheus-mcp-server
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── prometheus_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_aws_credentials.py
│   │   │   ├── test_config_manager.py
│   │   │   ├── test_consts.py
│   │   │   ├── test_coverage_gaps.py
│   │   │   ├── test_coverage_improvement.py
│   │   │   ├── test_final_coverage.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_prometheus_client.py
│   │   │   ├── test_prometheus_connection.py
│   │   │   ├── test_security_validator.py
│   │   │   ├── test_server_coverage.py
│   │   │   ├── test_tools.py
│   │   │   └── test_workspace_config.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── redshift-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── redshift_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── consts.py
│   │   │       ├── models.py
│   │   │       ├── redshift.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_redshift.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── s3-tables-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── s3_tables_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── constants.py
│   │   │       ├── database.py
│   │   │       ├── engines
│   │   │       │   ├── __init__.py
│   │   │       │   └── pyiceberg.py
│   │   │       ├── file_processor
│   │   │       │   ├── __init__.py
│   │   │       │   ├── csv.py
│   │   │       │   ├── parquet.py
│   │   │       │   └── utils.py
│   │   │       ├── models.py
│   │   │       ├── namespaces.py
│   │   │       ├── resources.py
│   │   │       ├── s3_operations.py
│   │   │       ├── server.py
│   │   │       ├── table_buckets.py
│   │   │       ├── tables.py
│   │   │       └── utils.py
│   │   ├── CHANGELOG.md
│   │   ├── CONTEXT.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_csv.py
│   │   │   ├── test_database.py
│   │   │   ├── test_file_processor_utils.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_namespaces.py
│   │   │   ├── test_parquet.py
│   │   │   ├── test_pyiceberg.py
│   │   │   ├── test_resources.py
│   │   │   ├── test_s3_operations.py
│   │   │   ├── test_server.py
│   │   │   ├── test_table_buckets.py
│   │   │   ├── test_tables.py
│   │   │   └── test_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── stepfunctions-tool-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── stepfunctions_tool_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_helper.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── test_aws_helper.py
│   │   │   ├── test_create_state_machine_tool.py
│   │   │   ├── test_filter_state_machines_by_tag.py
│   │   │   ├── test_format_state_machine_response.py
│   │   │   ├── test_get_schema_arn_from_state_machine_arn.py
│   │   │   ├── test_get_schema_from_registry.py
│   │   │   ├── test_invoke_express_state_machine_impl.py
│   │   │   ├── test_invoke_standard_state_machine_impl.py
│   │   │   ├── test_main.py
│   │   │   ├── test_register_state_machines.py
│   │   │   ├── test_sanitize_tool_name.py
│   │   │   ├── test_server.py
│   │   │   └── test_validate_state_machine_name.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── syntheticdata-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── syntheticdata_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── pandas_interpreter.py
│   │   │       ├── server.py
│   │   │       └── storage
│   │   │           ├── __init__.py
│   │   │           ├── base.py
│   │   │           ├── loader.py
│   │   │           └── s3.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_constants.py
│   │   │   ├── test_pandas_interpreter.py
│   │   │   ├── test_server.py
│   │   │   └── test_storage
│   │   │       ├── __init__.py
│   │   │       ├── test_loader.py
│   │   │       └── test_s3.py
│   │   └── uv.lock
│   ├── terraform-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── terraform_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── impl
│   │   │       │   ├── resources
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── terraform_aws_provider_resources_listing.py
│   │   │       │   │   └── terraform_awscc_provider_resources_listing.py
│   │   │       │   └── tools
│   │   │       │       ├── __init__.py
│   │   │       │       ├── execute_terraform_command.py
│   │   │       │       ├── execute_terragrunt_command.py
│   │   │       │       ├── run_checkov_scan.py
│   │   │       │       ├── search_aws_provider_docs.py
│   │   │       │       ├── search_awscc_provider_docs.py
│   │   │       │       ├── search_specific_aws_ia_modules.py
│   │   │       │       ├── search_user_provided_module.py
│   │   │       │       └── utils.py
│   │   │       ├── models
│   │   │       │   ├── __init__.py
│   │   │       │   └── models.py
│   │   │       ├── scripts
│   │   │       │   ├── generate_aws_provider_resources.py
│   │   │       │   ├── generate_awscc_provider_resources.py
│   │   │       │   └── scrape_aws_terraform_best_practices.py
│   │   │       ├── server.py
│   │   │       └── static
│   │   │           ├── __init__.py
│   │   │           ├── AWS_PROVIDER_RESOURCES.md
│   │   │           ├── AWS_TERRAFORM_BEST_PRACTICES.md
│   │   │           ├── AWSCC_PROVIDER_RESOURCES.md
│   │   │           ├── MCP_INSTRUCTIONS.md
│   │   │           └── TERRAFORM_WORKFLOW_GUIDE.md
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── .gitignore
│   │   │   ├── conftest.py
│   │   │   ├── README.md
│   │   │   ├── test_command_impl.py
│   │   │   ├── test_execute_terraform_command.py
│   │   │   ├── test_execute_terragrunt_command.py
│   │   │   ├── test_models.py
│   │   │   ├── test_parameter_annotations.py
│   │   │   ├── test_resources.py
│   │   │   ├── test_run_checkov_scan.py
│   │   │   ├── test_search_user_provided_module.py
│   │   │   ├── test_server.py
│   │   │   ├── test_tool_implementations.py
│   │   │   ├── test_utils_additional.py
│   │   │   └── test_utils.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── timestream-for-influxdb-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── timestream_for_influxdb_mcp_server
│   │   │       ├── __init__.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   └── test_server.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   ├── valkey-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── valkey_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── common
│   │   │       │   ├── __init__.py
│   │   │       │   ├── config.py
│   │   │       │   ├── connection.py
│   │   │       │   └── server.py
│   │   │       ├── context.py
│   │   │       ├── main.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.py
│   │   │       │   ├── bitmap.py
│   │   │       │   ├── hash.py
│   │   │       │   ├── hyperloglog.py
│   │   │       │   ├── json.py
│   │   │       │   ├── list.py
│   │   │       │   ├── misc.py
│   │   │       │   ├── server_management.py
│   │   │       │   ├── set.py
│   │   │       │   ├── sorted_set.py
│   │   │       │   ├── stream.py
│   │   │       │   └── string.py
│   │   │       └── version.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── ELASTICACHECONNECT.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── test_bitmap.py
│   │   │   ├── test_config.py
│   │   │   ├── test_connection.py
│   │   │   ├── test_hash.py
│   │   │   ├── test_hyperloglog.py
│   │   │   ├── test_init.py
│   │   │   ├── test_json_additional.py
│   │   │   ├── test_json_readonly.py
│   │   │   ├── test_json.py
│   │   │   ├── test_list_additional.py
│   │   │   ├── test_list_readonly.py
│   │   │   ├── test_list.py
│   │   │   ├── test_main.py
│   │   │   ├── test_misc.py
│   │   │   ├── test_server_management.py
│   │   │   ├── test_set_readonly.py
│   │   │   ├── test_set.py
│   │   │   ├── test_sorted_set_additional.py
│   │   │   ├── test_sorted_set_readonly.py
│   │   │   ├── test_sorted_set.py
│   │   │   ├── test_stream_additional.py
│   │   │   ├── test_stream_readonly.py
│   │   │   ├── test_stream.py
│   │   │   └── test_string.py
│   │   ├── uv-requirements.txt
│   │   └── uv.lock
│   └── well-architected-security-mcp-server
│       ├── .python-version
│       ├── awslabs
│       │   └── well_architected_security_mcp_server
│       │       ├── __init__.py
│       │       ├── consts.py
│       │       ├── server.py
│       │       └── util
│       │           ├── __init__.py
│       │           ├── network_security.py
│       │           ├── prompt_utils.py
│       │           ├── resource_utils.py
│       │           ├── security_services.py
│       │           └── storage_security.py
│       ├── PROMPT_TEMPLATE.md
│       ├── pyproject.toml
│       ├── README.md
│       ├── tests
│       │   ├── __init__.py
│       │   ├── conftest.py
│       │   ├── README.md
│       │   ├── test_access_analyzer_fix.py
│       │   ├── test_network_security_additional.py
│       │   ├── test_network_security.py
│       │   ├── test_prompt_utils_coverage.py
│       │   ├── test_prompt_utils.py
│       │   ├── test_resource_utils_fix.py
│       │   ├── test_resource_utils.py
│       │   ├── test_security_services_additional.py
│       │   ├── test_security_services_coverage.py
│       │   ├── test_security_services.py
│       │   ├── test_server_additional.py
│       │   ├── test_server_coverage.py
│       │   ├── test_server_prompts.py
│       │   ├── test_server_security_findings.py
│       │   ├── test_server.py
│       │   ├── test_storage_security_additional.py
│       │   ├── test_storage_security_comprehensive.py
│       │   ├── test_storage_security_edge_cases.py
│       │   ├── test_storage_security_recommendations.py
│       │   ├── test_storage_security.py
│       │   └── test_user_agent_config.py
│       └── uv.lock
├── testing
│   ├── __init__.py
│   ├── mcp_test_client.py
│   ├── mcp_test_runner.py
│   ├── pytest_utils.py
│   ├── README.md
│   └── types.py
└── VIBE_CODING_TIPS_TRICKS.md
```

# Files

--------------------------------------------------------------------------------
/src/eks-mcp-server/tests/test_k8s_apis.py:
--------------------------------------------------------------------------------

```python
   1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
   2 | #
   3 | # Licensed under the Apache License, Version 2.0 (the "License");
   4 | # you may not use this file except in compliance with the License.
   5 | # You may obtain a copy of the License at
   6 | #
   7 | #     http://www.apache.org/licenses/LICENSE-2.0
   8 | #
   9 | # Unless required by applicable law or agreed to in writing, software
  10 | # distributed under the License is distributed on an "AS IS" BASIS,
  11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 | # See the License for the specific language governing permissions and
  13 | # limitations under the License.
  14 | # ruff: noqa: D101, D102, D103
  15 | """Tests for the K8sApis class."""
  16 | 
  17 | import base64
  18 | import os
  19 | import pytest
  20 | from awslabs.eks_mcp_server.k8s_apis import K8sApis
  21 | from awslabs.eks_mcp_server.models import Operation
  22 | from datetime import datetime
  23 | from unittest.mock import MagicMock, patch
  24 | 
  25 | 
  26 | @pytest.fixture
  27 | def mock_kubernetes_client():
  28 |     """Create a mock Kubernetes client."""
  29 |     with patch('kubernetes.client') as mock_client:
  30 |         # Setup mock configuration
  31 |         mock_config = MagicMock()
  32 |         # Set host to a string to avoid TypeError with hashlib.md5()
  33 |         mock_config.host = 'https://test-endpoint'
  34 |         mock_client.Configuration.return_value = mock_config
  35 | 
  36 |         # Setup mock API client
  37 |         mock_api_client = MagicMock()
  38 |         mock_client.ApiClient.return_value = mock_api_client
  39 | 
  40 |         yield mock_client, mock_config, mock_api_client
  41 | 
  42 | 
  43 | @pytest.fixture
  44 | def k8s_apis(mock_kubernetes_client):
  45 |     """Create a K8sApis instance with mocked Kubernetes client."""
  46 |     _, _, mock_api_client = mock_kubernetes_client
  47 | 
  48 |     # Mock the dynamic client
  49 |     mock_dynamic_client = MagicMock()
  50 | 
  51 |     # Mock tempfile and file operations with context manager support
  52 |     mock_temp_file = MagicMock(name='/tmp/ca-cert-file')
  53 |     mock_temp_file.__enter__.return_value = mock_temp_file
  54 | 
  55 |     # Mock tempfile and file operations
  56 |     with (
  57 |         patch('tempfile.NamedTemporaryFile', return_value=mock_temp_file),
  58 |         patch('os.path.exists', return_value=True),
  59 |         patch('os.unlink'),
  60 |     ):
  61 |         # Create K8sApis instance with CA data
  62 |         ca_data = base64.b64encode(b'test-ca-data').decode('utf-8')
  63 | 
  64 |         # Create a real K8sApis instance but with mocked components
  65 |         with (
  66 |             patch('kubernetes.client.ApiClient', return_value=mock_api_client),
  67 |             patch('kubernetes.dynamic.DynamicClient', return_value=mock_dynamic_client),
  68 |             patch('tempfile.NamedTemporaryFile', return_value=mock_temp_file),
  69 |         ):
  70 |             # Create the actual instance
  71 |             apis = K8sApis('https://test-endpoint', 'test-token', ca_data)
  72 | 
  73 |             # Verify CA data was written to the temp file
  74 |             mock_temp_file.write.assert_called_once_with(b'test-ca-data')
  75 | 
  76 |             # Set up get_events to return different values for different tests
  77 |             apis.get_events = MagicMock()
  78 |             apis.get_events.return_value = [
  79 |                 {
  80 |                     'first_timestamp': str(datetime(2023, 1, 1, 0, 0, 0)),
  81 |                     'last_timestamp': str(datetime(2023, 1, 1, 0, 5, 0)),
  82 |                     'count': 5,
  83 |                     'message': 'Container created',
  84 |                     'reason': 'Created',
  85 |                     'reporting_component': 'kubelet',
  86 |                     'type': 'Normal',
  87 |                 }
  88 |             ]
  89 | 
  90 |     return apis
  91 | 
  92 | 
  93 | class TestK8sApisInitialization:
  94 |     """Tests for K8sApis initialization."""
  95 | 
  96 |     def test_init_requires_ca_data(self, mock_kubernetes_client):
  97 |         """Test initialization requires CA data."""
  98 |         # Initialize K8sApis without CA data - should raise TypeError
  99 |         with pytest.raises(TypeError):
 100 |             K8sApis('https://test-endpoint', 'test-token', None)
 101 | 
 102 |     def test_init_with_ca_data(self, mock_kubernetes_client):
 103 |         """Test initialization with CA data."""
 104 |         _, mock_config, _ = mock_kubernetes_client
 105 | 
 106 |         # Mock tempfile and file operations with context manager support
 107 |         mock_temp_file = MagicMock()
 108 |         mock_temp_file.name = '/tmp/ca-cert-file'
 109 |         mock_temp_file.__enter__.return_value = mock_temp_file
 110 | 
 111 |         # Mock the dynamic client
 112 |         mock_dynamic_client = MagicMock()
 113 | 
 114 |         with (
 115 |             patch('tempfile.NamedTemporaryFile', return_value=mock_temp_file),
 116 |             patch('os.path.exists', return_value=True),
 117 |             patch('os.unlink'),
 118 |             patch('kubernetes.dynamic.DynamicClient', return_value=mock_dynamic_client),
 119 |         ):
 120 |             # Create K8sApis instance with CA data
 121 |             ca_data = base64.b64encode(b'test-ca-data').decode('utf-8')
 122 | 
 123 |             # Initialize the K8sApis instance
 124 |             apis = K8sApis('https://test-endpoint', 'test-token', ca_data)
 125 | 
 126 |             # Verify configuration
 127 |             assert mock_config.host == 'https://test-endpoint'
 128 |             assert mock_config.api_key == {'authorization': 'Bearer test-token'}
 129 |             assert mock_config.verify_ssl is True
 130 |             assert mock_config.ssl_ca_cert == '/tmp/ca-cert-file'
 131 | 
 132 |             # Verify CA data was written to the temp file
 133 |             mock_temp_file.write.assert_called_once_with(b'test-ca-data')
 134 | 
 135 |             # Verify dynamic client was set
 136 |             assert apis.dynamic_client == mock_dynamic_client
 137 | 
 138 |     def test_init_with_ca_data_error(self, mock_kubernetes_client):
 139 |         """Test initialization with CA data when an error occurs."""
 140 |         _, _, _ = mock_kubernetes_client
 141 | 
 142 |         # Mock tempfile and file operations with context manager support
 143 |         mock_temp_file = MagicMock()
 144 |         mock_temp_file.name = '/tmp/ca-cert-file'
 145 |         mock_temp_file.__enter__.return_value = mock_temp_file
 146 | 
 147 |         # Make write operation raise an exception
 148 |         mock_temp_file.write.side_effect = Exception('Test error')
 149 | 
 150 |         with (
 151 |             patch('tempfile.NamedTemporaryFile', return_value=mock_temp_file),
 152 |             patch(
 153 |                 'os.path.exists', return_value=False
 154 |             ),  # File doesn't exist yet when exception occurs
 155 |         ):
 156 |             # Initialize K8sApis with CA data - should raise the exception
 157 |             ca_data = base64.b64encode(b'test-ca-data').decode('utf-8')
 158 |             with pytest.raises(Exception, match='Test error'):
 159 |                 K8sApis('https://test-endpoint', 'test-token', ca_data)
 160 | 
 161 |             # No need to verify cleanup as the file doesn't exist yet when the exception occurs
 162 | 
 163 |     def test_init_kubernetes_import_error(self):
 164 |         """Test initialization when kubernetes package is not installed."""
 165 |         # Mock import error by patching the import mechanism
 166 |         with patch(
 167 |             'builtins.__import__',
 168 |             side_effect=lambda name, *args, **kwargs: __import__(name, *args, **kwargs)
 169 |             if name != 'kubernetes'
 170 |             else exec('raise ImportError("kubernetes package not installed")'),
 171 |         ):
 172 |             # Initialize K8sApis - should raise ImportError
 173 |             with pytest.raises(ImportError, match='kubernetes package not installed'):
 174 |                 K8sApis('https://test-endpoint', 'test-token', 'test-ca-data')
 175 | 
 176 |     def test_cleanup_on_deletion(self):
 177 |         """Test cleanup of temporary CA certificate file on deletion."""
 178 |         # Create a mock K8sApis instance with a CA cert file path
 179 |         apis = MagicMock(spec=K8sApis)
 180 |         apis._ca_cert_file_path = '/tmp/ca-cert-file'
 181 | 
 182 |         # Mock os.path.exists and os.unlink
 183 |         with patch('os.path.exists', return_value=True), patch('os.unlink') as mock_unlink:
 184 |             # Call __del__ method
 185 |             K8sApis.__del__(apis)
 186 | 
 187 |             # Verify unlink was called
 188 |             mock_unlink.assert_called_once_with('/tmp/ca-cert-file')
 189 | 
 190 |     def test_cleanup_on_deletion_no_file(self):
 191 |         """Test cleanup when CA certificate file doesn't exist."""
 192 |         # Create a mock K8sApis instance with a CA cert file path
 193 |         apis = MagicMock(spec=K8sApis)
 194 |         apis._ca_cert_file_path = '/tmp/ca-cert-file'
 195 | 
 196 |         # Mock os.path.exists to return False
 197 |         with patch('os.path.exists', return_value=False), patch('os.unlink') as mock_unlink:
 198 |             # Call __del__ method
 199 |             K8sApis.__del__(apis)
 200 | 
 201 |             # Verify unlink was not called
 202 |             mock_unlink.assert_not_called()
 203 | 
 204 |     def test_cleanup_on_deletion_error(self):
 205 |         """Test cleanup when an error occurs during deletion."""
 206 |         # Create a mock K8sApis instance with a CA cert file path
 207 |         apis = MagicMock(spec=K8sApis)
 208 |         apis._ca_cert_file_path = '/tmp/ca-cert-file'
 209 | 
 210 |         # Mock os.path.exists and os.unlink to raise an exception
 211 |         with (
 212 |             patch('os.path.exists', return_value=True),
 213 |             patch('os.unlink', side_effect=Exception('Test error')),
 214 |         ):
 215 |             # Call __del__ method - should not raise an exception
 216 |             K8sApis.__del__(apis)
 217 | 
 218 | 
 219 | class TestK8sApisOperations:
 220 |     """Tests for K8sApis operations."""
 221 | 
 222 |     def test_dynamic_client_initialization(self, k8s_apis):
 223 |         """Test that the dynamic client is initialized."""
 224 |         # Verify that the dynamic client is initialized
 225 |         assert hasattr(k8s_apis, 'dynamic_client')
 226 |         assert k8s_apis.dynamic_client is not None
 227 | 
 228 |     def test_manage_resource_create(self, k8s_apis):
 229 |         """Test manage_resource method with create operation."""
 230 |         # Mock the dynamic client and resources
 231 |         mock_resource = MagicMock()
 232 |         mock_resources = MagicMock()
 233 |         mock_resources.get.return_value = mock_resource
 234 |         k8s_apis.dynamic_client.resources = mock_resources
 235 | 
 236 |         # Test create operation
 237 |         body = {'metadata': {'name': 'test-pod'}}
 238 |         k8s_apis.manage_resource(
 239 |             Operation.CREATE, 'Pod', 'v1', name='test-pod', namespace='default', body=body
 240 |         )
 241 | 
 242 |         # Verify the dynamic client was used correctly
 243 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 244 |         mock_resource.create.assert_called_once()
 245 |         _, kwargs = mock_resource.create.call_args
 246 |         assert kwargs['body']['kind'] == 'Pod'
 247 |         assert kwargs['body']['apiVersion'] == 'v1'
 248 |         assert kwargs['body']['metadata']['name'] == 'test-pod'
 249 |         assert kwargs['namespace'] == 'default'
 250 | 
 251 |     def test_manage_resource_read(self, k8s_apis):
 252 |         """Test manage_resource method with read operation."""
 253 |         # Mock the dynamic client and resources
 254 |         mock_resource = MagicMock()
 255 |         mock_resources = MagicMock()
 256 |         mock_resources.get.return_value = mock_resource
 257 |         k8s_apis.dynamic_client.resources = mock_resources
 258 | 
 259 |         # Test read operation
 260 |         k8s_apis.manage_resource(Operation.READ, 'Pod', 'v1', name='test-pod', namespace='default')
 261 | 
 262 |         # Verify the dynamic client was used correctly
 263 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 264 |         mock_resource.get.assert_called_once_with(name='test-pod', namespace='default')
 265 | 
 266 |     def test_manage_resource_replace(self, k8s_apis):
 267 |         """Test manage_resource method with replace operation."""
 268 |         # Mock the dynamic client and resources
 269 |         mock_resource = MagicMock()
 270 |         mock_resources = MagicMock()
 271 |         mock_resources.get.return_value = mock_resource
 272 |         k8s_apis.dynamic_client.resources = mock_resources
 273 | 
 274 |         # Test replace operation
 275 |         body = {'metadata': {'name': 'test-pod'}}
 276 |         k8s_apis.manage_resource(
 277 |             Operation.REPLACE, 'Pod', 'v1', name='test-pod', namespace='default', body=body
 278 |         )
 279 | 
 280 |         # Verify the dynamic client was used correctly
 281 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 282 |         mock_resource.replace.assert_called_once()
 283 |         _, kwargs = mock_resource.replace.call_args
 284 |         assert kwargs['body']['kind'] == 'Pod'
 285 |         assert kwargs['body']['apiVersion'] == 'v1'
 286 |         assert kwargs['body']['metadata']['name'] == 'test-pod'
 287 |         assert kwargs['name'] == 'test-pod'
 288 |         assert kwargs['namespace'] == 'default'
 289 | 
 290 |     def test_manage_resource_patch(self, k8s_apis):
 291 |         """Test manage_resource method with patch operation."""
 292 |         # Mock the dynamic client and resources
 293 |         mock_resource = MagicMock()
 294 |         mock_resources = MagicMock()
 295 |         mock_resources.get.return_value = mock_resource
 296 |         k8s_apis.dynamic_client.resources = mock_resources
 297 | 
 298 |         # Test patch operation
 299 |         body = {'metadata': {'labels': {'app': 'test'}}}
 300 |         k8s_apis.manage_resource(
 301 |             Operation.PATCH, 'Pod', 'v1', name='test-pod', namespace='default', body=body
 302 |         )
 303 | 
 304 |         # Verify the dynamic client was used correctly
 305 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 306 |         mock_resource.patch.assert_called_once()
 307 |         _, kwargs = mock_resource.patch.call_args
 308 |         assert kwargs['body']['kind'] == 'Pod'
 309 |         assert kwargs['body']['apiVersion'] == 'v1'
 310 |         assert kwargs['body']['metadata']['labels']['app'] == 'test'
 311 |         assert kwargs['name'] == 'test-pod'
 312 |         assert kwargs['namespace'] == 'default'
 313 |         assert kwargs['content_type'] == 'application/strategic-merge-patch+json'
 314 | 
 315 |     def test_manage_resource_delete(self, k8s_apis):
 316 |         """Test manage_resource method with delete operation."""
 317 |         # Mock the dynamic client and resources
 318 |         mock_resource = MagicMock()
 319 |         mock_resources = MagicMock()
 320 |         mock_resources.get.return_value = mock_resource
 321 |         k8s_apis.dynamic_client.resources = mock_resources
 322 | 
 323 |         # Test delete operation
 324 |         k8s_apis.manage_resource(
 325 |             Operation.DELETE, 'Pod', 'v1', name='test-pod', namespace='default'
 326 |         )
 327 | 
 328 |         # Verify the dynamic client was used correctly
 329 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 330 |         mock_resource.delete.assert_called_once_with(name='test-pod', namespace='default')
 331 | 
 332 |     def test_patch_with_dynamic_client_fallback(self, k8s_apis):
 333 |         """Test patch operation with dynamic client falling back to merge patch."""
 334 |         # Mock the dynamic client and resources
 335 |         mock_resource = MagicMock()
 336 |         mock_resources = MagicMock()
 337 |         mock_resources.get.return_value = mock_resource
 338 |         k8s_apis.dynamic_client.resources = mock_resources
 339 | 
 340 |         # Make strategic merge patch fail with a 415 error
 341 |         mock_resource.patch.side_effect = [
 342 |             Exception('415 Unsupported Media Type'),  # First call fails
 343 |             MagicMock(),  # Second call succeeds
 344 |         ]
 345 | 
 346 |         # Test patch operation
 347 |         body = {'metadata': {'labels': {'app': 'test'}}}
 348 |         k8s_apis.manage_resource(
 349 |             Operation.PATCH, 'Pod', 'v1', name='test-pod', namespace='default', body=body
 350 |         )
 351 | 
 352 |         # Verify the dynamic client was used correctly
 353 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 354 | 
 355 |         # Verify patch was called twice - first with strategic merge patch, then with merge patch
 356 |         assert mock_resource.patch.call_count == 2
 357 | 
 358 |         # Check first call (strategic merge patch)
 359 |         args1, kwargs1 = mock_resource.patch.call_args_list[0]
 360 |         assert kwargs1['name'] == 'test-pod'
 361 |         assert kwargs1['namespace'] == 'default'
 362 |         assert kwargs1['body']['kind'] == 'Pod'
 363 |         assert kwargs1['content_type'] == 'application/strategic-merge-patch+json'
 364 | 
 365 |         # Check second call (merge patch fallback)
 366 |         _, kwargs2 = mock_resource.patch.call_args_list[1]
 367 |         assert kwargs2['name'] == 'test-pod'
 368 |         assert kwargs2['namespace'] == 'default'
 369 |         assert kwargs2['body']['kind'] == 'Pod'
 370 |         assert kwargs2['content_type'] == 'application/merge-patch+json'
 371 | 
 372 |     def test_patch_resource_direct(self, k8s_apis):
 373 |         """Test _patch_resource method directly."""
 374 |         # Mock the resource
 375 |         mock_resource = MagicMock()
 376 | 
 377 |         # Test body and parameters
 378 |         body = {'metadata': {'labels': {'app': 'test'}}}
 379 |         name = 'test-pod'
 380 |         namespace = 'default'
 381 | 
 382 |         # Call _patch_resource directly
 383 |         k8s_apis._patch_resource(mock_resource, body, name, namespace)
 384 | 
 385 |         # Verify patch was called with strategic merge patch
 386 |         mock_resource.patch.assert_called_once()
 387 |         _, kwargs = mock_resource.patch.call_args
 388 |         assert kwargs['body'] == body
 389 |         assert kwargs['name'] == name
 390 |         assert kwargs['namespace'] == namespace
 391 |         assert kwargs['content_type'] == 'application/strategic-merge-patch+json'
 392 | 
 393 |     def test_patch_resource_with_other_error(self, k8s_apis):
 394 |         """Test _patch_resource method with an error other than 415."""
 395 |         # Mock the resource
 396 |         mock_resource = MagicMock()
 397 | 
 398 |         # Make patch raise a non-415 error
 399 |         mock_resource.patch.side_effect = Exception('Some other error')
 400 | 
 401 |         # Test body and parameters
 402 |         body = {'metadata': {'labels': {'app': 'test'}}}
 403 |         name = 'test-pod'
 404 |         namespace = 'default'
 405 | 
 406 |         # Call _patch_resource - should raise the original error
 407 |         with pytest.raises(Exception, match='Some other error'):
 408 |             k8s_apis._patch_resource(mock_resource, body, name, namespace)
 409 | 
 410 |         # Verify patch was called once with strategic merge patch
 411 |         mock_resource.patch.assert_called_once()
 412 |         _, kwargs = mock_resource.patch.call_args
 413 |         assert kwargs['content_type'] == 'application/strategic-merge-patch+json'
 414 | 
 415 |     def test_manage_resource_validation(self, k8s_apis):
 416 |         """Test manage_resource method validation."""
 417 |         # Test missing name for read operation
 418 |         with pytest.raises(ValueError, match='Resource name is required for read operation'):
 419 |             k8s_apis.manage_resource(Operation.READ, 'Pod', 'v1')
 420 | 
 421 |         # Test missing body for create operation
 422 |         with pytest.raises(ValueError, match='Resource body is required for create operation'):
 423 |             k8s_apis.manage_resource(Operation.CREATE, 'Pod', 'v1', name='test-pod')
 424 | 
 425 |     def test_manage_resource_unsupported_operation(self, k8s_apis):
 426 |         """Test manage_resource method with unsupported operation."""
 427 |         # Create a custom operation that's not supported
 428 |         unsupported_op = MagicMock()
 429 |         unsupported_op.value = 'UNSUPPORTED'
 430 | 
 431 |         # Test with unsupported operation
 432 |         with pytest.raises(ValueError, match='Unsupported operation: UNSUPPORTED'):
 433 |             k8s_apis.manage_resource(unsupported_op, 'Pod', 'v1', name='test-pod')
 434 | 
 435 |     def test_manage_resource_error_handling(self, k8s_apis):
 436 |         """Test manage_resource method error handling."""
 437 |         # Mock the dynamic client and resources
 438 |         mock_resources = MagicMock()
 439 |         mock_resources.get.side_effect = Exception('Resource not found')
 440 |         k8s_apis.dynamic_client.resources = mock_resources
 441 | 
 442 |         # Test with an error during resource retrieval
 443 |         with pytest.raises(ValueError, match='Error managing Pod resource: Resource not found'):
 444 |             k8s_apis.manage_resource(Operation.READ, 'Pod', 'v1', name='test-pod')
 445 | 
 446 |     def test_list_resources_with_namespace(self, k8s_apis):
 447 |         """Test list_resources method with namespace."""
 448 |         # Mock the dynamic client and resources
 449 |         mock_resource = MagicMock()
 450 |         mock_resources = MagicMock()
 451 |         mock_resources.get.return_value = mock_resource
 452 |         k8s_apis.dynamic_client.resources = mock_resources
 453 | 
 454 |         # Test list operation with namespace
 455 |         k8s_apis.list_resources(
 456 |             'Pod',
 457 |             'v1',
 458 |             namespace='default',
 459 |             label_selector='app=test',
 460 |             field_selector='status.phase=Running',
 461 |         )
 462 | 
 463 |         # Verify the dynamic client was used correctly
 464 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 465 |         mock_resource.get.assert_called_once()
 466 |         _, kwargs = mock_resource.get.call_args
 467 |         assert kwargs['namespace'] == 'default'
 468 |         assert kwargs['label_selector'] == 'app=test'
 469 |         assert kwargs['field_selector'] == 'status.phase=Running'
 470 | 
 471 |     def test_list_resources_all_namespaces(self, k8s_apis):
 472 |         """Test list_resources method without namespace (all namespaces)."""
 473 |         # Mock the dynamic client and resources
 474 |         mock_resource = MagicMock()
 475 |         mock_resources = MagicMock()
 476 |         mock_resources.get.return_value = mock_resource
 477 |         k8s_apis.dynamic_client.resources = mock_resources
 478 | 
 479 |         # Test list operation without namespace
 480 |         k8s_apis.list_resources('Pod', 'v1')
 481 | 
 482 |         # Verify the dynamic client was used correctly
 483 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 484 |         mock_resource.get.assert_called_once()
 485 |         _, kwargs = mock_resource.get.call_args
 486 |         assert 'namespace' not in kwargs
 487 | 
 488 |     def test_list_resources_with_additional_kwargs(self, k8s_apis):
 489 |         """Test list_resources method with additional kwargs."""
 490 |         # Mock the dynamic client and resources
 491 |         mock_resource = MagicMock()
 492 |         mock_resources = MagicMock()
 493 |         mock_resources.get.return_value = mock_resource
 494 |         k8s_apis.dynamic_client.resources = mock_resources
 495 | 
 496 |         # Test list operation with additional kwargs
 497 |         k8s_apis.list_resources(
 498 |             'Pod',
 499 |             'v1',
 500 |             namespace='default',
 501 |             limit=100,
 502 |             timeout_seconds=30,
 503 |         )
 504 | 
 505 |         # Verify the dynamic client was used correctly
 506 |         mock_resources.get.assert_called_once_with(api_version='v1', kind='Pod')
 507 |         mock_resource.get.assert_called_once()
 508 |         _, kwargs = mock_resource.get.call_args
 509 |         assert kwargs['namespace'] == 'default'
 510 |         assert kwargs['limit'] == 100
 511 |         assert kwargs['timeout_seconds'] == 30
 512 | 
 513 |     def test_list_resources_error_handling(self, k8s_apis):
 514 |         """Test list_resources method error handling."""
 515 |         # Mock the dynamic client and resources
 516 |         mock_resources = MagicMock()
 517 |         mock_resources.get.side_effect = Exception('Resource not found')
 518 |         k8s_apis.dynamic_client.resources = mock_resources
 519 | 
 520 |         # Test with an error during resource retrieval
 521 |         with pytest.raises(ValueError, match='Error listing Pod resources: Resource not found'):
 522 |             k8s_apis.list_resources('Pod', 'v1')
 523 | 
 524 |     def test_get_pod_logs(self, k8s_apis):
 525 |         """Test get_pod_logs method."""
 526 |         # Mock the CoreV1Api client
 527 |         with patch('kubernetes.client') as mock_client:
 528 |             # Create mock CoreV1Api
 529 |             mock_core_v1_api = MagicMock()
 530 |             mock_client.CoreV1Api.return_value = mock_core_v1_api
 531 | 
 532 |             # Mock read_namespaced_pod_log to return logs
 533 |             mock_core_v1_api.read_namespaced_pod_log.return_value = 'log line 1\nlog line 2\n'
 534 | 
 535 |             # Get pod logs with all parameters
 536 |             logs = k8s_apis.get_pod_logs(
 537 |                 pod_name='test-pod',
 538 |                 namespace='test-namespace',
 539 |                 container_name='test-container',
 540 |                 since_seconds=60,
 541 |                 tail_lines=100,
 542 |                 limit_bytes=1024,
 543 |                 previous=True,
 544 |             )
 545 | 
 546 |             # Verify the result
 547 |             assert logs == 'log line 1\nlog line 2\n'
 548 | 
 549 |             # Verify CoreV1Api was created with the correct API client
 550 |             mock_client.CoreV1Api.assert_called_once_with(k8s_apis.api_client)
 551 | 
 552 |             # Verify read_namespaced_pod_log was called with the correct parameters
 553 |             mock_core_v1_api.read_namespaced_pod_log.assert_called_once_with(
 554 |                 name='test-pod',
 555 |                 namespace='test-namespace',
 556 |                 container='test-container',
 557 |                 since_seconds=60,
 558 |                 tail_lines=100,
 559 |                 limit_bytes=1024,
 560 |                 previous=True,
 561 |             )
 562 | 
 563 |     def test_get_pod_logs_minimal(self, k8s_apis):
 564 |         """Test get_pod_logs method with minimal parameters."""
 565 |         # Mock the CoreV1Api client
 566 |         with patch('kubernetes.client') as mock_client:
 567 |             # Create mock CoreV1Api
 568 |             mock_core_v1_api = MagicMock()
 569 |             mock_client.CoreV1Api.return_value = mock_core_v1_api
 570 | 
 571 |             # Mock read_namespaced_pod_log to return logs
 572 |             mock_core_v1_api.read_namespaced_pod_log.return_value = 'log line 1\nlog line 2\n'
 573 | 
 574 |             # Get pod logs with minimal parameters
 575 |             logs = k8s_apis.get_pod_logs(
 576 |                 pod_name='test-pod',
 577 |                 namespace='test-namespace',
 578 |             )
 579 | 
 580 |             # Verify the result
 581 |             assert logs == 'log line 1\nlog line 2\n'
 582 | 
 583 |             # Verify CoreV1Api was created with the correct API client
 584 |             mock_client.CoreV1Api.assert_called_once_with(k8s_apis.api_client)
 585 | 
 586 |             # Verify read_namespaced_pod_log was called with the correct parameters
 587 |             mock_core_v1_api.read_namespaced_pod_log.assert_called_once_with(
 588 |                 name='test-pod',
 589 |                 namespace='test-namespace',
 590 |             )
 591 | 
 592 |     def test_get_pod_logs_error_handling(self, k8s_apis):
 593 |         """Test get_pod_logs method error handling."""
 594 |         # Mock the CoreV1Api client
 595 |         with patch('kubernetes.client') as mock_client:
 596 |             # Create mock CoreV1Api
 597 |             mock_core_v1_api = MagicMock()
 598 |             mock_client.CoreV1Api.return_value = mock_core_v1_api
 599 | 
 600 |             # Make read_namespaced_pod_log raise an exception
 601 |             mock_core_v1_api.read_namespaced_pod_log.side_effect = Exception('Pod not found')
 602 | 
 603 |             # Call get_pod_logs - should raise ValueError with context
 604 |             with pytest.raises(
 605 |                 ValueError,
 606 |                 match='Error getting logs from pod test-namespace/test-pod: Pod not found',
 607 |             ):
 608 |                 k8s_apis.get_pod_logs(
 609 |                     pod_name='test-pod',
 610 |                     namespace='test-namespace',
 611 |                 )
 612 | 
 613 |     def _create_mock_event(self):
 614 |         """Create a mock event for testing."""
 615 |         mock_event_item = MagicMock()
 616 |         mock_event_item.to_dict.return_value = {
 617 |             'metadata': {'name': 'event-1', 'namespace': 'test-namespace'},
 618 |             'firstTimestamp': datetime(2023, 1, 1, 0, 0, 0),  # Using datetime object
 619 |             'lastTimestamp': datetime(2023, 1, 1, 0, 5, 0),  # Using datetime object
 620 |             'count': 5,
 621 |             'message': 'Container created',
 622 |             'reason': 'Created',
 623 |             'source': {'component': 'kubelet', 'host': 'node-1'},
 624 |             'type': 'Normal',
 625 |             'involvedObject': {'kind': 'Pod', 'name': 'test-pod', 'namespace': 'test-namespace'},
 626 |         }
 627 |         return mock_event_item
 628 | 
 629 |     def _verify_event_result(self, events):
 630 |         """Verify the event result."""
 631 |         assert len(events) == 1
 632 |         # Check that timestamps are properly converted to strings
 633 |         assert events[0]['first_timestamp'] == str(datetime(2023, 1, 1, 0, 0, 0))
 634 |         assert events[0]['last_timestamp'] == str(datetime(2023, 1, 1, 0, 5, 0))
 635 |         assert events[0]['count'] == 5
 636 |         assert events[0]['message'] == 'Container created'
 637 |         assert events[0]['reason'] == 'Created'
 638 |         assert events[0]['reporting_component'] == 'kubelet'
 639 |         assert events[0]['type'] == 'Normal'
 640 | 
 641 |     def test_get_events_with_namespace(self, k8s_apis):
 642 |         """Test get_events method with namespace provided."""
 643 |         # Get events with namespace
 644 |         events = k8s_apis.get_events(
 645 |             kind='Pod',
 646 |             name='test-pod',
 647 |             namespace='test-namespace',
 648 |         )
 649 | 
 650 |         # Verify the result
 651 |         self._verify_event_result(events)
 652 | 
 653 |         # Verify the method was called with the correct parameters
 654 |         k8s_apis.get_events.assert_called_with(
 655 |             kind='Pod',
 656 |             name='test-pod',
 657 |             namespace='test-namespace',
 658 |         )
 659 | 
 660 |     def test_get_events_all_namespaces(self, k8s_apis):
 661 |         """Test get_events method without namespace (all namespaces)."""
 662 |         # Get events without namespace
 663 |         events = k8s_apis.get_events(
 664 |             kind='Pod',
 665 |             name='test-pod',
 666 |         )
 667 | 
 668 |         # Verify the result
 669 |         self._verify_event_result(events)
 670 | 
 671 |         # Verify the method was called with the correct parameters
 672 |         k8s_apis.get_events.assert_called_with(
 673 |             kind='Pod',
 674 |             name='test-pod',
 675 |         )
 676 | 
 677 |     def test_get_events_empty(self, k8s_apis):
 678 |         """Test get_events method with no events found."""
 679 |         # Override the default mock to return an empty list for this test
 680 |         k8s_apis.get_events.return_value = []
 681 | 
 682 |         # Get events with namespace
 683 |         events = k8s_apis.get_events(
 684 |             kind='Pod',
 685 |             name='test-pod',
 686 |             namespace='test-namespace',
 687 |         )
 688 | 
 689 |         # Verify the result is an empty list
 690 |         assert len(events) == 0
 691 |         assert events == []
 692 | 
 693 |         # Verify the method was called with the correct parameters
 694 |         k8s_apis.get_events.assert_called_with(
 695 |             kind='Pod',
 696 |             name='test-pod',
 697 |             namespace='test-namespace',
 698 |         )
 699 | 
 700 |     def test_get_events_implementation(self):
 701 |         """Test the actual implementation of get_events method."""
 702 |         # Mock the kubernetes dynamic client
 703 |         with (
 704 |             patch('kubernetes.client') as mock_client,
 705 |             patch('kubernetes.dynamic') as mock_dynamic,
 706 |         ):
 707 |             # Create mock API client
 708 |             mock_api_client = MagicMock()
 709 |             mock_client.ApiClient.return_value = mock_api_client
 710 | 
 711 |             # Create mock dynamic client
 712 |             mock_dynamic_client = MagicMock()
 713 |             mock_dynamic.DynamicClient.return_value = mock_dynamic_client
 714 | 
 715 |             # Create mock resource
 716 |             mock_resource = MagicMock()
 717 |             mock_dynamic_client.resources.get.return_value = mock_resource
 718 | 
 719 |             # Create mock event response
 720 |             mock_event_response = MagicMock()
 721 |             mock_event_item1 = MagicMock()
 722 |             mock_event_item1.to_dict.return_value = {
 723 |                 'metadata': {'name': 'event-1', 'namespace': 'test-namespace'},
 724 |                 'firstTimestamp': datetime(2023, 1, 1, 0, 0, 0),
 725 |                 'lastTimestamp': datetime(2023, 1, 1, 0, 5, 0),
 726 |                 'count': 5,
 727 |                 'message': 'Container created',
 728 |                 'reason': 'Created',
 729 |                 'source': {'component': 'kubelet', 'host': 'node-1'},
 730 |                 'type': 'Normal',
 731 |                 'involvedObject': {
 732 |                     'kind': 'Pod',
 733 |                     'name': 'test-pod',
 734 |                     'namespace': 'test-namespace',
 735 |                 },
 736 |             }
 737 |             mock_event_item2 = MagicMock()
 738 |             mock_event_item2.to_dict.return_value = {
 739 |                 'metadata': {'name': 'event-2', 'namespace': 'test-namespace'},
 740 |                 'firstTimestamp': datetime(2023, 1, 1, 0, 10, 0),
 741 |                 'lastTimestamp': datetime(2023, 1, 1, 0, 15, 0),
 742 |                 'count': 3,
 743 |                 'message': 'Container started',
 744 |                 'reason': 'Started',
 745 |                 'source': {'component': 'kubelet', 'host': 'node-1'},
 746 |                 'type': 'Normal',
 747 |                 'involvedObject': {
 748 |                     'kind': 'Pod',
 749 |                     'name': 'test-pod',
 750 |                     'namespace': 'test-namespace',
 751 |                 },
 752 |             }
 753 |             mock_event_response.items = [mock_event_item1, mock_event_item2]
 754 |             mock_resource.get.return_value = mock_event_response
 755 | 
 756 |             # Create a temporary file for CA certificate
 757 |             with (
 758 |                 patch('tempfile.NamedTemporaryFile') as mock_temp_file,
 759 |                 patch('os.path.exists', return_value=True),
 760 |                 patch('os.unlink'),
 761 |             ):
 762 |                 # Mock the context manager for NamedTemporaryFile
 763 |                 mock_file = MagicMock()
 764 |                 mock_file.name = '/tmp/ca-cert-file'
 765 |                 mock_temp_file.return_value.__enter__.return_value = mock_file
 766 | 
 767 |                 # Create K8sApis instance
 768 |                 ca_data = base64.b64encode(b'test-ca-data').decode('utf-8')
 769 |                 apis = K8sApis('https://test-endpoint', 'test-token', ca_data)
 770 | 
 771 |                 # Call get_events with namespace
 772 |                 events = apis.get_events(
 773 |                     kind='Pod',
 774 |                     name='test-pod',
 775 |                     namespace='test-namespace',
 776 |                 )
 777 | 
 778 |                 # Verify the dynamic client was used correctly
 779 |                 mock_dynamic_client.resources.get.assert_called_once_with(
 780 |                     api_version='v1', kind='Event'
 781 |                 )
 782 |                 mock_resource.get.assert_called_once_with(
 783 |                     namespace='test-namespace',
 784 |                     field_selector='involvedObject.kind=Pod,involvedObject.name=test-pod',
 785 |                 )
 786 | 
 787 |                 # Verify the result
 788 |                 assert len(events) == 2
 789 | 
 790 |                 # Check first event
 791 |                 assert events[0]['first_timestamp'] == str(datetime(2023, 1, 1, 0, 0, 0))
 792 |                 assert events[0]['last_timestamp'] == str(datetime(2023, 1, 1, 0, 5, 0))
 793 |                 assert events[0]['count'] == 5
 794 |                 assert events[0]['message'] == 'Container created'
 795 |                 assert events[0]['reason'] == 'Created'
 796 |                 assert events[0]['reporting_component'] == 'kubelet'
 797 |                 assert events[0]['type'] == 'Normal'
 798 | 
 799 |                 # Check second event
 800 |                 assert events[1]['first_timestamp'] == str(datetime(2023, 1, 1, 0, 10, 0))
 801 |                 assert events[1]['last_timestamp'] == str(datetime(2023, 1, 1, 0, 15, 0))
 802 |                 assert events[1]['count'] == 3
 803 |                 assert events[1]['message'] == 'Container started'
 804 |                 assert events[1]['reason'] == 'Started'
 805 |                 assert events[1]['reporting_component'] == 'kubelet'
 806 |                 assert events[1]['type'] == 'Normal'
 807 | 
 808 |     def test_get_events_implementation_all_namespaces(self):
 809 |         """Test the actual implementation of get_events method without namespace."""
 810 |         # Mock the kubernetes dynamic client
 811 |         with (
 812 |             patch('kubernetes.client') as mock_client,
 813 |             patch('kubernetes.dynamic') as mock_dynamic,
 814 |         ):
 815 |             # Create mock API client
 816 |             mock_api_client = MagicMock()
 817 |             mock_client.ApiClient.return_value = mock_api_client
 818 | 
 819 |             # Create mock dynamic client
 820 |             mock_dynamic_client = MagicMock()
 821 |             mock_dynamic.DynamicClient.return_value = mock_dynamic_client
 822 | 
 823 |             # Create mock resource
 824 |             mock_resource = MagicMock()
 825 |             mock_dynamic_client.resources.get.return_value = mock_resource
 826 | 
 827 |             # Create mock event response
 828 |             mock_event_response = MagicMock()
 829 |             mock_event_item = MagicMock()
 830 |             mock_event_item.to_dict.return_value = {
 831 |                 'metadata': {'name': 'event-1'},
 832 |                 'firstTimestamp': datetime(2023, 1, 1, 0, 0, 0),
 833 |                 'lastTimestamp': datetime(2023, 1, 1, 0, 5, 0),
 834 |                 'count': 5,
 835 |                 'message': 'Node condition changed',
 836 |                 'reason': 'NodeConditionChanged',
 837 |                 'source': {'component': 'kubelet', 'host': 'node-1'},
 838 |                 'type': 'Normal',
 839 |                 'involvedObject': {'kind': 'Node', 'name': 'test-node'},
 840 |             }
 841 |             mock_event_response.items = [mock_event_item]
 842 |             mock_resource.get.return_value = mock_event_response
 843 | 
 844 |             # Create a temporary file for CA certificate
 845 |             with (
 846 |                 patch('tempfile.NamedTemporaryFile') as mock_temp_file,
 847 |                 patch('os.path.exists', return_value=True),
 848 |                 patch('os.unlink'),
 849 |             ):
 850 |                 # Mock the context manager for NamedTemporaryFile
 851 |                 mock_file = MagicMock()
 852 |                 mock_file.name = '/tmp/ca-cert-file'
 853 |                 mock_temp_file.return_value.__enter__.return_value = mock_file
 854 | 
 855 |                 # Create K8sApis instance
 856 |                 ca_data = base64.b64encode(b'test-ca-data').decode('utf-8')
 857 |                 apis = K8sApis('https://test-endpoint', 'test-token', ca_data)
 858 | 
 859 |                 # Call get_events without namespace
 860 |                 events = apis.get_events(
 861 |                     kind='Node',
 862 |                     name='test-node',
 863 |                 )
 864 | 
 865 |                 # Verify the dynamic client was used correctly
 866 |                 mock_dynamic_client.resources.get.assert_called_once_with(
 867 |                     api_version='v1', kind='Event'
 868 |                 )
 869 |                 mock_resource.get.assert_called_once_with(
 870 |                     field_selector='involvedObject.kind=Node,involvedObject.name=test-node'
 871 |                 )
 872 | 
 873 |                 # Verify the result
 874 |                 assert len(events) == 1
 875 |                 assert events[0]['first_timestamp'] == str(datetime(2023, 1, 1, 0, 0, 0))
 876 |                 assert events[0]['last_timestamp'] == str(datetime(2023, 1, 1, 0, 5, 0))
 877 |                 assert events[0]['count'] == 5
 878 |                 assert events[0]['message'] == 'Node condition changed'
 879 |                 assert events[0]['reason'] == 'NodeConditionChanged'
 880 |                 assert events[0]['reporting_component'] == 'kubelet'
 881 |                 assert events[0]['type'] == 'Normal'
 882 | 
 883 |     def test_get_events_implementation_error(self):
 884 |         """Test the actual implementation of get_events method with error."""
 885 |         # Mock the kubernetes dynamic client
 886 |         with (
 887 |             patch('kubernetes.client') as mock_client,
 888 |             patch('kubernetes.dynamic') as mock_dynamic,
 889 |         ):
 890 |             # Create mock API client
 891 |             mock_api_client = MagicMock()
 892 |             mock_client.ApiClient.return_value = mock_api_client
 893 | 
 894 |             # Create mock dynamic client
 895 |             mock_dynamic_client = MagicMock()
 896 |             mock_dynamic.DynamicClient.return_value = mock_dynamic_client
 897 | 
 898 |             # Create mock resource that raises an exception
 899 |             mock_resource = MagicMock()
 900 |             mock_dynamic_client.resources.get.return_value = mock_resource
 901 |             mock_resource.get.side_effect = Exception('Resource not found')
 902 | 
 903 |             # Create a temporary file for CA certificate
 904 |             with (
 905 |                 patch('tempfile.NamedTemporaryFile') as mock_temp_file,
 906 |                 patch('os.path.exists', return_value=True),
 907 |                 patch('os.unlink'),
 908 |             ):
 909 |                 # Mock the context manager for NamedTemporaryFile
 910 |                 mock_file = MagicMock()
 911 |                 mock_file.name = '/tmp/ca-cert-file'
 912 |                 mock_temp_file.return_value.__enter__.return_value = mock_file
 913 | 
 914 |                 # Create K8sApis instance
 915 |                 ca_data = base64.b64encode(b'test-ca-data').decode('utf-8')
 916 |                 apis = K8sApis('https://test-endpoint', 'test-token', ca_data)
 917 | 
 918 |                 # Call get_events - should raise ValueError with context
 919 |                 with pytest.raises(
 920 |                     ValueError,
 921 |                     match='Error getting events for Pod test-namespace/test-pod: Resource not found',
 922 |                 ):
 923 |                     apis.get_events(
 924 |                         kind='Pod',
 925 |                         name='test-pod',
 926 |                         namespace='test-namespace',
 927 |                     )
 928 | 
 929 |     def test_apply_from_yaml_create_new_resources(self, k8s_apis):
 930 |         """Test applying YAML that creates new resources."""
 931 |         # Setup mock resources
 932 |         resource_mock = MagicMock()
 933 |         k8s_apis.dynamic_client.resources.get.return_value = resource_mock
 934 | 
 935 |         # Setup test data
 936 |         yaml_objects = [
 937 |             {
 938 |                 'kind': 'Deployment',
 939 |                 'apiVersion': 'apps/v1',
 940 |                 'metadata': {'name': 'test-deployment', 'namespace': 'default'},
 941 |                 'spec': {'replicas': 1},
 942 |             },
 943 |             {
 944 |                 'kind': 'Service',
 945 |                 'apiVersion': 'v1',
 946 |                 'metadata': {'name': 'test-service', 'namespace': 'default'},
 947 |                 'spec': {'ports': [{'port': 80}]},
 948 |             },
 949 |         ]
 950 | 
 951 |         # Mock resource.get to raise exception (resource doesn't exist)
 952 |         resource_mock.get.side_effect = Exception('Not found')
 953 | 
 954 |         # Call the method
 955 |         results, created_count, updated_count = k8s_apis.apply_from_yaml(yaml_objects)
 956 | 
 957 |         # Verify results
 958 |         assert created_count == 2
 959 |         assert updated_count == 0
 960 |         assert resource_mock.create.call_count == 2
 961 | 
 962 |         # Verify create was called with correct parameters for both resources
 963 |         calls = resource_mock.create.call_args_list
 964 |         assert len(calls) == 2
 965 | 
 966 |         # Check first call (Deployment)
 967 |         args1, kwargs1 = calls[0]
 968 |         assert kwargs1['body']['kind'] == 'Deployment'
 969 |         assert kwargs1['body']['apiVersion'] == 'apps/v1'
 970 |         assert kwargs1['body']['metadata']['name'] == 'test-deployment'
 971 |         assert kwargs1['namespace'] == 'default'
 972 | 
 973 |         # Check second call (Service)
 974 |         args2, kwargs2 = calls[1]
 975 |         assert kwargs2['body']['kind'] == 'Service'
 976 |         assert kwargs2['body']['apiVersion'] == 'v1'
 977 |         assert kwargs2['body']['metadata']['name'] == 'test-service'
 978 |         assert kwargs2['namespace'] == 'default'
 979 | 
 980 |     def test_apply_from_yaml_update_existing_resources(self, k8s_apis):
 981 |         """Test applying YAML that updates existing resources."""
 982 |         # Setup mock resources
 983 |         resource_mock = MagicMock()
 984 |         k8s_apis.dynamic_client.resources.get.return_value = resource_mock
 985 | 
 986 |         # Setup test data
 987 |         yaml_objects = [
 988 |             {
 989 |                 'kind': 'Deployment',
 990 |                 'apiVersion': 'apps/v1',
 991 |                 'metadata': {'name': 'test-deployment', 'namespace': 'default'},
 992 |                 'spec': {'replicas': 2},  # Updated replicas
 993 |             }
 994 |         ]
 995 | 
 996 |         # Mock resource.get to return successfully (resource exists)
 997 |         resource_mock.get.return_value = MagicMock()
 998 | 
 999 |         # Setup _patch_resource mock
1000 |         k8s_apis._patch_resource = MagicMock()
1001 | 
1002 |         # Call the method
1003 |         results, created_count, updated_count = k8s_apis.apply_from_yaml(yaml_objects)
1004 | 
1005 |         # Verify results
1006 |         assert created_count == 0
1007 |         assert updated_count == 1
1008 |         assert resource_mock.create.call_count == 0
1009 |         assert k8s_apis._patch_resource.call_count == 1
1010 | 
1011 |         # Verify patch was called with correct parameters
1012 |         k8s_apis._patch_resource.assert_called_once_with(
1013 |             resource_mock, yaml_objects[0], 'test-deployment', 'default'
1014 |         )
1015 | 
1016 |     def test_apply_from_yaml_force_false_no_update(self, k8s_apis):
1017 |         """Test applying YAML with force=False doesn't update existing resources."""
1018 |         # Setup mock resources
1019 |         resource_mock = MagicMock()
1020 |         k8s_apis.dynamic_client.resources.get.return_value = resource_mock
1021 | 
1022 |         # Setup test data
1023 |         yaml_objects = [
1024 |             {
1025 |                 'kind': 'Deployment',
1026 |                 'apiVersion': 'apps/v1',
1027 |                 'metadata': {'name': 'test-deployment', 'namespace': 'default'},
1028 |                 'spec': {'replicas': 2},
1029 |             }
1030 |         ]
1031 | 
1032 |         # For the first object, simulate it exists
1033 |         resource_mock.get.return_value = MagicMock()
1034 | 
1035 |         # Setup _patch_resource mock
1036 |         k8s_apis._patch_resource = MagicMock()
1037 | 
1038 |         # Call the method with force=False
1039 |         _, created_count, updated_count = k8s_apis.apply_from_yaml(yaml_objects, force=False)
1040 | 
1041 |         # Verify results - should create new resources, not update existing ones
1042 |         assert created_count == 1
1043 |         assert updated_count == 0
1044 |         assert resource_mock.create.call_count == 1
1045 |         assert k8s_apis._patch_resource.call_count == 0
1046 | 
1047 |         # Verify create was called with correct parameters
1048 |         resource_mock.create.assert_called_once()
1049 |         args, kwargs = resource_mock.create.call_args
1050 |         assert kwargs['body']['kind'] == 'Deployment'
1051 |         assert kwargs['body']['apiVersion'] == 'apps/v1'
1052 |         assert kwargs['body']['metadata']['name'] == 'test-deployment'
1053 |         assert kwargs['namespace'] == 'default'
1054 | 
1055 |     def test_apply_from_yaml_custom_resource(self, k8s_apis):
1056 |         """Test applying YAML with custom resources."""
1057 |         # Setup mock resources
1058 |         resource_mock = MagicMock()
1059 |         k8s_apis.dynamic_client.resources.get.return_value = resource_mock
1060 | 
1061 |         # Setup test data for a custom resource
1062 |         yaml_objects = [
1063 |             {
1064 |                 'kind': 'EksApp',
1065 |                 'apiVersion': 'eks.amazonaws.com/v1',
1066 |                 'metadata': {'name': 'example-app', 'namespace': 'default'},
1067 |                 'spec': {'replicas': 1},
1068 |             }
1069 |         ]
1070 | 
1071 |         # Mock resource.get to raise exception (resource doesn't exist)
1072 |         resource_mock.get.side_effect = Exception('Not found')
1073 | 
1074 |         # Call the method
1075 |         _, created_count, updated_count = k8s_apis.apply_from_yaml(yaml_objects)
1076 | 
1077 |         # Verify results
1078 |         assert created_count == 1
1079 |         assert updated_count == 0
1080 |         assert resource_mock.create.call_count == 1
1081 | 
1082 |         # Verify the dynamic client was used correctly for the custom resource
1083 |         k8s_apis.dynamic_client.resources.get.assert_called_once_with(
1084 |             api_version='eks.amazonaws.com/v1', kind='EksApp'
1085 |         )
1086 | 
1087 |         # Verify create was called with correct parameters
1088 |         resource_mock.create.assert_called_once()
1089 |         args, kwargs = resource_mock.create.call_args
1090 |         assert kwargs['body']['kind'] == 'EksApp'
1091 |         assert kwargs['body']['apiVersion'] == 'eks.amazonaws.com/v1'
1092 |         assert kwargs['body']['metadata']['name'] == 'example-app'
1093 |         assert kwargs['namespace'] == 'default'
1094 | 
1095 |     def test_apply_from_yaml_error_handling(self, k8s_apis):
1096 |         """Test error handling in apply_from_yaml."""
1097 |         # Setup mock resources
1098 |         resource_mock = MagicMock()
1099 |         k8s_apis.dynamic_client.resources.get.return_value = resource_mock
1100 | 
1101 |         # Setup test data with invalid resource (missing name)
1102 |         yaml_objects = [
1103 |             {
1104 |                 'kind': 'Deployment',
1105 |                 'apiVersion': 'apps/v1',
1106 |                 'metadata': {},  # Missing name
1107 |                 'spec': {'replicas': 1},
1108 |             }
1109 |         ]
1110 | 
1111 |         # Call the method - should raise ValueError
1112 |         with pytest.raises(
1113 |             ValueError, match='Invalid resource: missing kind, apiVersion, or name'
1114 |         ):
1115 |             k8s_apis.apply_from_yaml(yaml_objects)
1116 | 
1117 |         # Test error during resource creation
1118 |         yaml_objects = [
1119 |             {
1120 |                 'kind': 'Deployment',
1121 |                 'apiVersion': 'apps/v1',
1122 |                 'metadata': {'name': 'test-deployment', 'namespace': 'default'},
1123 |                 'spec': {'replicas': 1},
1124 |             }
1125 |         ]
1126 | 
1127 |         # Mock resource.get to raise exception (resource doesn't exist)
1128 |         resource_mock.get.side_effect = Exception('Not found')
1129 | 
1130 |         # Mock resource.create to raise exception
1131 |         resource_mock.create.side_effect = Exception('Creation failed')
1132 | 
1133 |         # Call the method - should raise ValueError with context
1134 |         with pytest.raises(
1135 |             ValueError, match='Error applying Deployment default/test-deployment: Creation failed'
1136 |         ):
1137 |             k8s_apis.apply_from_yaml(yaml_objects)
1138 | 
1139 |     def test_apply_from_yaml_empty_objects(self, k8s_apis):
1140 |         """Test applying YAML with empty objects."""
1141 |         # Setup test data with empty objects
1142 |         yaml_objects = [None, {}, None]
1143 | 
1144 |         # Call the method
1145 |         results, created_count, updated_count = k8s_apis.apply_from_yaml(yaml_objects)
1146 | 
1147 |         # Verify results - should not create or update any resources
1148 |         assert created_count == 0
1149 |         assert updated_count == 0
1150 |         assert len(results) == 0
1151 |         assert k8s_apis.dynamic_client.resources.get.call_count == 0
1152 | 
1153 |     def test_apply_from_yaml_with_additional_kwargs(self, k8s_apis):
1154 |         """Test applying YAML with additional kwargs."""
1155 |         # Setup mock resources
1156 |         resource_mock = MagicMock()
1157 |         k8s_apis.dynamic_client.resources.get.return_value = resource_mock
1158 | 
1159 |         # Setup test data
1160 |         yaml_objects = [
1161 |             {
1162 |                 'kind': 'Deployment',
1163 |                 'apiVersion': 'apps/v1',
1164 |                 'metadata': {'name': 'test-deployment', 'namespace': 'default'},
1165 |                 'spec': {'replicas': 1},
1166 |             }
1167 |         ]
1168 | 
1169 |         # Mock resource.get to raise exception (resource doesn't exist)
1170 |         resource_mock.get.side_effect = Exception('Not found')
1171 | 
1172 |         # Call the method with additional kwargs
1173 |         _, created_count, updated_count = k8s_apis.apply_from_yaml(
1174 |             yaml_objects, dry_run='All', field_manager='test-manager'
1175 |         )
1176 | 
1177 |         # Verify results
1178 |         assert created_count == 1
1179 |         assert updated_count == 0
1180 |         assert resource_mock.create.call_count == 1
1181 | 
1182 |         # Verify create was called with correct parameters including additional kwargs
1183 |         _, kwargs = resource_mock.create.call_args
1184 |         assert kwargs['body']['kind'] == 'Deployment'
1185 |         assert kwargs['dry_run'] == 'All'
1186 |         assert kwargs['field_manager'] == 'test-manager'
1187 | 
1188 |     def test_get_api_versions_success(self, k8s_apis):
1189 |         """Test get_api_versions method success."""
1190 |         # Mock the kubernetes client imports
1191 |         with patch('kubernetes.client') as mock_client:
1192 |             # Mock CoreApi
1193 |             mock_core_api = MagicMock()
1194 |             mock_core_version = MagicMock()
1195 |             mock_core_version.versions = ['v1']
1196 |             mock_core_api.get_api_versions.return_value = mock_core_version
1197 |             mock_client.CoreApi.return_value = mock_core_api
1198 | 
1199 |             # Mock ApisApi
1200 |             mock_apis_api = MagicMock()
1201 |             mock_api_groups = MagicMock()
1202 | 
1203 |             # Create mock groups with versions
1204 |             mock_group1 = MagicMock()
1205 |             mock_version1 = MagicMock()
1206 |             mock_version1.group_version = 'apps/v1'
1207 |             mock_group1.preferred_version = mock_version1
1208 | 
1209 |             mock_group2 = MagicMock()
1210 |             mock_version2 = MagicMock()
1211 |             mock_version2.group_version = 'networking.k8s.io/v1'
1212 |             mock_group2.preferred_version = mock_version2
1213 | 
1214 |             mock_api_groups.groups = [mock_group1, mock_group2]
1215 |             mock_apis_api.get_api_versions.return_value = mock_api_groups
1216 |             mock_client.ApisApi.return_value = mock_apis_api
1217 | 
1218 |             # Call the method
1219 |             api_versions = k8s_apis.get_api_versions()
1220 | 
1221 |             # Verify results
1222 |             assert len(api_versions) == 3
1223 |             assert 'v1' in api_versions
1224 |             assert 'apps/v1' in api_versions
1225 |             assert 'networking.k8s.io/v1' in api_versions
1226 |             assert api_versions == sorted(api_versions)  # Should be sorted
1227 | 
1228 |             # Verify the APIs were called correctly
1229 |             mock_client.CoreApi.assert_called_once_with(k8s_apis.api_client)
1230 |             mock_core_api.get_api_versions.assert_called_once()
1231 |             mock_client.ApisApi.assert_called_once_with(k8s_apis.api_client)
1232 |             mock_apis_api.get_api_versions.assert_called_once()
1233 | 
1234 |     def test_get_api_versions_error(self, k8s_apis):
1235 |         """Test get_api_versions method with error."""
1236 |         # Mock the kubernetes client imports
1237 |         with patch('kubernetes.client') as mock_client:
1238 |             # Mock CoreApi to raise an exception
1239 |             mock_core_api = MagicMock()
1240 |             mock_core_api.get_api_versions.side_effect = Exception('API discovery failed')
1241 |             mock_client.CoreApi.return_value = mock_core_api
1242 | 
1243 |             # Call the method - should raise ValueError
1244 |             with pytest.raises(
1245 |                 ValueError, match='Error getting API versions: API discovery failed'
1246 |             ):
1247 |                 k8s_apis.get_api_versions()
1248 | 
1249 |             # Verify the API was called
1250 |             mock_client.CoreApi.assert_called_once_with(k8s_apis.api_client)
1251 |             mock_core_api.get_api_versions.assert_called_once()
1252 | 
1253 |     def test_get_api_versions_core_api_error_apis_api_success(self, k8s_apis):
1254 |         """Test get_api_versions method with CoreApi error but ApisApi success."""
1255 |         # Mock the kubernetes client imports
1256 |         with patch('kubernetes.client') as mock_client:
1257 |             # Mock CoreApi to raise an exception
1258 |             mock_core_api = MagicMock()
1259 |             mock_core_api.get_api_versions.side_effect = Exception('Core API discovery failed')
1260 |             mock_client.CoreApi.return_value = mock_core_api
1261 | 
1262 |             # Mock ApisApi
1263 |             mock_apis_api = MagicMock()
1264 |             mock_api_groups = MagicMock()
1265 | 
1266 |             # Create mock groups with versions
1267 |             mock_group1 = MagicMock()
1268 |             mock_version1 = MagicMock()
1269 |             mock_version1.group_version = 'apps/v1'
1270 |             mock_group1.preferred_version = mock_version1
1271 | 
1272 |             mock_api_groups.groups = [mock_group1]
1273 |             mock_apis_api.get_api_versions.return_value = mock_api_groups
1274 |             mock_client.ApisApi.return_value = mock_apis_api
1275 | 
1276 |             # Call the method - should raise ValueError because CoreApi failed
1277 |             with pytest.raises(
1278 |                 ValueError, match='Error getting API versions: Core API discovery failed'
1279 |             ):
1280 |                 k8s_apis.get_api_versions()
1281 | 
1282 |             # Verify the APIs were called correctly
1283 |             mock_client.CoreApi.assert_called_once_with(k8s_apis.api_client)
1284 |             mock_core_api.get_api_versions.assert_called_once()
1285 |             # ApisApi should not be called since CoreApi failed
1286 |             mock_client.ApisApi.assert_not_called()
1287 | 
1288 | 
1289 | class TestK8sProxySupport:
1290 |     """Test proxy configuration for Kubernetes client."""
1291 | 
1292 |     @pytest.fixture
1293 |     def mock_k8s_modules(self):
1294 |         """Mock kubernetes modules."""
1295 |         with (
1296 |             patch('kubernetes.client') as mock_client,
1297 |             patch('kubernetes.dynamic') as mock_dynamic,
1298 |         ):
1299 |             # Create mock configuration
1300 |             mock_config = MagicMock()
1301 |             mock_client.Configuration.return_value = mock_config
1302 | 
1303 |             # Create mock API client
1304 |             mock_api_client = MagicMock()
1305 |             mock_client.ApiClient.return_value = mock_api_client
1306 | 
1307 |             # Create mock dynamic client
1308 |             mock_dynamic_client = MagicMock()
1309 |             mock_dynamic.DynamicClient.return_value = mock_dynamic_client
1310 | 
1311 |             yield {
1312 |                 'config': mock_config,
1313 |                 'api_client': mock_api_client,
1314 |                 'dynamic_client': mock_dynamic_client,
1315 |                 'client_module': mock_client,
1316 |                 'dynamic_module': mock_dynamic,
1317 |             }
1318 | 
1319 |     def test_proxy_configuration_with_https_proxy(self, mock_k8s_modules):
1320 |         """Test that HTTPS proxy settings are correctly configured."""
1321 |         # Set up environment variables
1322 |         test_env = {
1323 |             'HTTPS_PROXY': 'http://proxy.example.com:8080',
1324 |             'HTTP_PROXY': 'http://proxy.example.com:8080',
1325 |         }
1326 | 
1327 |         with patch.dict(os.environ, test_env, clear=False):
1328 |             # Create test data
1329 |             endpoint = 'https://test-cluster.eks.amazonaws.com'
1330 |             token = 'test-token'
1331 |             ca_data = base64.b64encode(b'test-ca-cert').decode()
1332 | 
1333 |             # Create K8sApis instance
1334 |             K8sApis(endpoint, token, ca_data)
1335 | 
1336 |             # Verify proxy was configured
1337 |             mock_config = mock_k8s_modules['config']
1338 |             assert mock_config.proxy == 'http://proxy.example.com:8080'
1339 | 
1340 |     def test_proxy_configuration_http_fallback(self, mock_k8s_modules):
1341 |         """Test that HTTP proxy is used when HTTPS proxy is not available."""
1342 |         # Set up environment variables with only HTTP proxy
1343 |         test_env = {
1344 |             'HTTP_PROXY': 'http://proxy.example.com:9090',
1345 |         }
1346 | 
1347 |         with patch.dict(os.environ, test_env, clear=False):
1348 |             # Create test data
1349 |             endpoint = 'https://test-cluster.eks.amazonaws.com'
1350 |             token = 'test-token'
1351 |             ca_data = base64.b64encode(b'test-ca-cert').decode()
1352 | 
1353 |             # Create K8sApis instance
1354 |             K8sApis(endpoint, token, ca_data)
1355 | 
1356 |             # Verify HTTP proxy was configured
1357 |             mock_config = mock_k8s_modules['config']
1358 |             assert mock_config.proxy == 'http://proxy.example.com:9090'
1359 | 
1360 |     def test_proxy_configuration_lowercase_env_vars(self, mock_k8s_modules):
1361 |         """Test that lowercase proxy environment variables are supported."""
1362 |         # Set up environment variables with lowercase names
1363 |         test_env = {
1364 |             'https_proxy': 'http://proxy.example.com:8080',
1365 |             'http_proxy': 'http://proxy.example.com:8080',
1366 |         }
1367 | 
1368 |         with patch.dict(os.environ, test_env, clear=False):
1369 |             # Create test data
1370 |             endpoint = 'https://test-cluster.eks.amazonaws.com'
1371 |             token = 'test-token'
1372 |             ca_data = base64.b64encode(b'test-ca-cert').decode()
1373 | 
1374 |             # Create K8sApis instance
1375 |             K8sApis(endpoint, token, ca_data)
1376 | 
1377 |             # Verify proxy was configured
1378 |             mock_config = mock_k8s_modules['config']
1379 |             assert mock_config.proxy == 'http://proxy.example.com:8080'
1380 | 
1381 |     def test_no_proxy_configuration_when_env_vars_absent(self, mock_k8s_modules):
1382 |         """Test that no proxy is configured when environment variables are not set."""
1383 |         # Ensure proxy environment variables are not set by removing them
1384 |         proxy_vars = ['HTTP_PROXY', 'HTTPS_PROXY', 'http_proxy', 'https_proxy']
1385 | 
1386 |         # Save original values and remove them
1387 |         original_values = {}
1388 |         for var in proxy_vars:
1389 |             original_values[var] = os.environ.get(var)
1390 |             if var in os.environ:
1391 |                 del os.environ[var]
1392 | 
1393 |         try:
1394 |             # Create test data
1395 |             endpoint = 'https://test-cluster.eks.amazonaws.com'
1396 |             token = 'test-token'
1397 |             ca_data = base64.b64encode(b'test-ca-cert').decode()
1398 | 
1399 |             # Create K8sApis instance
1400 |             k8s_apis = K8sApis(endpoint, token, ca_data)
1401 | 
1402 |             # Verify no proxy was configured - with no proxy env vars,
1403 |             # the proxy attribute should remain as the default MagicMock
1404 |             mock_k8s_modules['config']
1405 |             # Since we can't easily check if proxy was set with MagicMock,
1406 |             # we just verify the instance was created successfully
1407 |             assert k8s_apis is not None
1408 | 
1409 |         finally:
1410 |             # Restore original values
1411 |             for var, value in original_values.items():
1412 |                 if value is not None:
1413 |                     os.environ[var] = value
1414 | 
1415 |     def test_proxy_configuration_with_mixed_case_env_vars(self, mock_k8s_modules):
1416 |         """Test that uppercase proxy variables take precedence over lowercase."""
1417 |         # Set up environment variables with both cases
1418 |         test_env = {
1419 |             'HTTPS_PROXY': 'http://uppercase-proxy.example.com:8080',
1420 |             'https_proxy': 'http://lowercase-proxy.example.com:8080',
1421 |         }
1422 | 
1423 |         with patch.dict(os.environ, test_env, clear=False):
1424 |             # Create test data
1425 |             endpoint = 'https://test-cluster.eks.amazonaws.com'
1426 |             token = 'test-token'
1427 |             ca_data = base64.b64encode(b'test-ca-cert').decode()
1428 | 
1429 |             # Create K8sApis instance
1430 |             K8sApis(endpoint, token, ca_data)
1431 | 
1432 |             # Verify uppercase proxy was used
1433 |             mock_config = mock_k8s_modules['config']
1434 |             assert mock_config.proxy == 'http://uppercase-proxy.example.com:8080'
1435 | 
```
Page 684/717FirstPrevNextLast