#
tokens: 56662/50000 1/2496 files (page 537/560)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 537 of 560. 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.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-appsignals-mcp-server.md
│   │   │   ├── cloudwatch-mcp-server.md
│   │   │   ├── code-doc-gen-mcp-server.md
│   │   │   ├── core-mcp-server.md
│   │   │   ├── cost-explorer-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
│   │   │   ├── sagemaker-hyperpod-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
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.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
│   │   │   ├── 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_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.py
│   │   │       ├── server.py
│   │   │       ├── tools
│   │   │       │   ├── __init__.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
│   │   │           └── validation_utils.py
│   │   ├── CHANGELOG.md
│   │   ├── docker-healthcheck.sh
│   │   ├── Dockerfile
│   │   ├── docs
│   │   │   └── workflow_linting.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── conftest.py
│   │   │   ├── test_aws_utils.py
│   │   │   ├── test_consts.py
│   │   │   ├── test_helper_tools.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_run_analysis.py
│   │   │   ├── test_s3_utils.py
│   │   │   ├── test_server.py
│   │   │   ├── test_troubleshooting.py
│   │   │   ├── test_workflow_analysis.py
│   │   │   ├── test_workflow_execution.py
│   │   │   ├── test_workflow_linting.py
│   │   │   ├── test_workflow_management.py
│   │   │   └── test_workflow_tools.py
│   │   ├── 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.py
│   │   │       ├── prompts
│   │   │       │   ├── __init__.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_data.py
│   │   │       │   ├── sitewise_gateways.py
│   │   │       │   └── sitewise_metadata_transfer.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
│   │   │   ├── test_client.py
│   │   │   ├── test_init.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   ├── test_server.py
│   │   │   ├── test_sitewise_access.py
│   │   │   ├── test_sitewise_asset_models.py
│   │   │   ├── test_sitewise_assets.py
│   │   │   ├── test_sitewise_data.py
│   │   │   ├── test_sitewise_gateways.py
│   │   │   ├── test_sitewise_metadata_transfer.py
│   │   │   └── test_validation.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-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
│   │   │       ├── 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_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
│   │   │       │   ├── data
│   │   │       │   │   └── metric_metadata.json
│   │   │       │   ├── 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_metrics_error_handling.py
│   │   │   │   ├── test_metrics_models.py
│   │   │   │   ├── test_metrics_server.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
│   ├── 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
│   │   │       ├── 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_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
│   ├── sagemaker-hyperpod-mcp-server
│   │   ├── .gitignore
│   │   ├── .python-version
│   │   ├── awslabs
│   │   │   ├── __init__.py
│   │   │   └── sagemaker_hyperpod_mcp_server
│   │   │       ├── __init__.py
│   │   │       ├── aws_helper.py
│   │   │       ├── consts.py
│   │   │       ├── hyperpod_cluster_node_handler.py
│   │   │       ├── hyperpod_stack_handler.py
│   │   │       ├── logging_helper.py
│   │   │       ├── models.py
│   │   │       └── server.py
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── NOTICE
│   │   ├── pyproject.toml
│   │   ├── README.md
│   │   ├── tests
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_aws_helper.py
│   │   │   ├── test_hyperpod_cluster_node_handler.py
│   │   │   ├── test_hyperpod_stack_handler.py
│   │   │   ├── test_init.py
│   │   │   ├── test_logging_helper.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   └── test_server.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
└── VIBE_CODING_TIPS_TRICKS.md
```

# Files

--------------------------------------------------------------------------------
/src/ecs-mcp-server/tests/unit/troubleshooting_tools/test_utils.py:
--------------------------------------------------------------------------------

```python
   1 | """
   2 | Unit tests for the utils.py module.
   3 | """
   4 | 
   5 | from unittest import mock
   6 | 
   7 | import pytest
   8 | from botocore.exceptions import ClientError
   9 | 
  10 | from awslabs.ecs_mcp_server.api.troubleshooting_tools.utils import (
  11 |     _get_task_definition_by_service,
  12 |     _get_task_definition_by_task,
  13 |     _get_task_definitions_by_family_prefix,
  14 |     _get_task_definitions_by_stack,
  15 |     find_clusters,
  16 |     find_load_balancers,
  17 |     find_services,
  18 |     find_task_definitions,
  19 |     get_cloudformation_stack_if_exists,
  20 | )
  21 | from tests.unit.utils.async_test_utils import (
  22 |     AsyncIterator,
  23 | )
  24 | 
  25 | 
  26 | class TestUtilsBase:
  27 |     """Base class for utility tests with proper AWS client mocking."""
  28 | 
  29 |     def setup_method(self):
  30 |         """Clear AWS client cache before each test to ensure isolation."""
  31 |         from awslabs.ecs_mcp_server.utils.aws import _aws_clients
  32 | 
  33 |         _aws_clients.clear()
  34 | 
  35 |     def mock_aws_clients(self, mock_clients):
  36 |         """
  37 |         Create a context manager that mocks boto3.client with the provided client dictionary.
  38 | 
  39 |         Args:
  40 |             mock_clients: Dictionary mapping service names to mock clients
  41 |                          e.g., {"ecs": mock_ecs, "cloudformation": mock_cfn}
  42 |         """
  43 | 
  44 |         def mock_client_factory(service_name, **kwargs):
  45 |             return mock_clients.get(service_name, mock.MagicMock())
  46 | 
  47 |         return mock.patch("boto3.client", side_effect=mock_client_factory)
  48 | 
  49 | 
  50 | @pytest.fixture
  51 | def mock_aws_clients():
  52 |     """Set up all mock AWS clients needed for testing."""
  53 |     mock_ecs = mock.MagicMock()
  54 |     mock_cfn = mock.MagicMock()
  55 |     mock_elbv2 = mock.MagicMock()
  56 | 
  57 |     # Return dictionary of clients
  58 |     return {"ecs": mock_ecs, "cloudformation": mock_cfn, "elbv2": mock_elbv2}
  59 | 
  60 | 
  61 | class TestFindClusters(TestUtilsBase):
  62 |     """Test the find_clusters function in utils.py."""
  63 | 
  64 |     @pytest.mark.anyio
  65 |     async def test_find_clusters_success(self, mock_aws_clients):
  66 |         """Test successful retrieval of cluster names."""
  67 |         mock_ecs = mock_aws_clients["ecs"]
  68 | 
  69 |         # Set up paginator - using Mock not MagicMock because paginate is not async
  70 |         paginator = mock.Mock()
  71 |         paginator.paginate.return_value = AsyncIterator(
  72 |             [
  73 |                 {
  74 |                     "clusterArns": [
  75 |                         "arn:aws:ecs:us-west-2:123456789012:cluster/cluster-1",
  76 |                         "arn:aws:ecs:us-west-2:123456789012:cluster/cluster-2",
  77 |                     ]
  78 |                 }
  79 |             ]
  80 |         )
  81 |         # Replace get_paginator with a regular Mock to avoid returning a coroutine
  82 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
  83 | 
  84 |         # Mock boto3.client to return our mock client
  85 |         with self.mock_aws_clients({"ecs": mock_ecs}):
  86 |             result = await find_clusters()
  87 | 
  88 |         # Assert the function correctly extracted cluster names
  89 |         assert len(result) == 2
  90 |         assert "cluster-1" in result
  91 |         assert "cluster-2" in result
  92 |         mock_ecs.get_paginator.assert_called_once_with("list_clusters")
  93 | 
  94 |     @pytest.mark.anyio
  95 |     async def test_find_clusters_empty_response(self, mock_aws_clients):
  96 |         """Test with empty response from list_clusters."""
  97 |         mock_ecs = mock_aws_clients["ecs"]
  98 | 
  99 |         # Configure empty response with paginator
 100 |         paginator = mock.Mock()
 101 |         paginator.paginate.return_value = AsyncIterator([{"clusterArns": []}])
 102 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 103 | 
 104 |         # Mock boto3.client to return our mock client
 105 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 106 |             result = await find_clusters()
 107 | 
 108 |         # Assert empty result
 109 |         assert result == []
 110 |         mock_ecs.get_paginator.assert_called_once_with("list_clusters")
 111 | 
 112 |     @pytest.mark.anyio
 113 |     async def test_find_clusters_missing_key(self, mock_aws_clients):
 114 |         """Test with missing 'clusterArns' key in response."""
 115 |         mock_ecs = mock_aws_clients["ecs"]
 116 | 
 117 |         # Configure response without clusterArns key
 118 |         paginator = mock.Mock()
 119 |         paginator.paginate.return_value = AsyncIterator([{}])
 120 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 121 | 
 122 |         # Mock boto3.client to return our mock client
 123 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 124 |             result = await find_clusters()
 125 | 
 126 |         # Assert empty result
 127 |         assert result == []
 128 |         mock_ecs.get_paginator.assert_called_once_with("list_clusters")
 129 | 
 130 |     @pytest.mark.anyio
 131 |     async def test_find_clusters_with_invalid_arn(self, mock_aws_clients):
 132 |         """Test handling of invalid ARN format."""
 133 |         mock_ecs = mock_aws_clients["ecs"]
 134 | 
 135 |         # Configure response with invalid ARN
 136 |         paginator = mock.Mock()
 137 |         paginator.paginate.return_value = AsyncIterator(
 138 |             [
 139 |                 {
 140 |                     "clusterArns": [
 141 |                         "arn:aws:ecs:us-west-2:123456789012:cluster/valid-cluster",
 142 |                         "invalid-arn-format",
 143 |                     ]
 144 |                 }
 145 |             ]
 146 |         )
 147 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 148 | 
 149 |         # Mock boto3.client to return our mock client
 150 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 151 |             result = await find_clusters()
 152 | 
 153 |         # Should only include the valid ARN
 154 |         assert len(result) == 1
 155 |         assert "valid-cluster" in result
 156 |         mock_ecs.get_paginator.assert_called_once_with("list_clusters")
 157 | 
 158 |     @pytest.mark.anyio
 159 |     async def test_find_clusters_with_exception(self, mock_aws_clients):
 160 |         """Test exception handling in find_clusters."""
 161 |         mock_ecs = mock_aws_clients["ecs"]
 162 | 
 163 |         # Configure get_paginator to raise an exception
 164 |         mock_ecs.get_paginator.side_effect = Exception("Test exception")
 165 | 
 166 |         # Mock boto3.client to return our mock client
 167 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 168 |             result = await find_clusters()
 169 | 
 170 |         # Should return empty list on exception
 171 |         assert result == []
 172 |         mock_ecs.get_paginator.assert_called_once_with("list_clusters")
 173 | 
 174 |     @pytest.mark.anyio
 175 |     async def test_find_clusters_with_pagination(self, mock_aws_clients):
 176 |         """Test pagination handling in find_clusters."""
 177 |         mock_ecs = mock_aws_clients["ecs"]
 178 | 
 179 |         # Set up paginator mock for multiple pages
 180 |         paginator = mock.Mock()
 181 |         paginator.paginate.return_value = AsyncIterator(
 182 |             [
 183 |                 {"clusterArns": ["arn:aws:ecs:us-west-2:123456789012:cluster/cluster-page1"]},
 184 |                 {"clusterArns": ["arn:aws:ecs:us-west-2:123456789012:cluster/cluster-page2"]},
 185 |             ]
 186 |         )
 187 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 188 | 
 189 |         # Mock boto3.client to return our mock client
 190 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 191 |             result = await find_clusters()
 192 | 
 193 |         # Should include results from all pages
 194 |         assert len(result) == 2
 195 |         assert "cluster-page1" in result
 196 |         assert "cluster-page2" in result
 197 |         mock_ecs.get_paginator.assert_called_once_with("list_clusters")
 198 | 
 199 | 
 200 | class TestFindServices(TestUtilsBase):
 201 |     """Test the find_services function in utils.py."""
 202 | 
 203 |     @pytest.mark.anyio
 204 |     async def test_find_services_success(self, mock_aws_clients):
 205 |         """Test successful retrieval of service names."""
 206 |         mock_ecs = mock_aws_clients["ecs"]
 207 | 
 208 |         # Configure paginator mock for list_services
 209 |         paginator = mock.Mock()
 210 |         paginator.paginate.return_value = AsyncIterator(
 211 |             [
 212 |                 {
 213 |                     "serviceArns": [
 214 |                         "arn:aws:ecs:us-west-2:123456789012:service/test-cluster/service-1",
 215 |                         "arn:aws:ecs:us-west-2:123456789012:service/test-cluster/service-2",
 216 |                     ]
 217 |                 }
 218 |             ]
 219 |         )
 220 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 221 | 
 222 |         # Mock boto3.client to return our mock client
 223 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 224 |             result = await find_services("test-cluster")
 225 | 
 226 |         # Assert the function correctly extracted service names
 227 |         assert len(result) == 2
 228 |         assert "service-1" in result
 229 |         assert "service-2" in result
 230 |         mock_ecs.get_paginator.assert_called_once_with("list_services")
 231 |         paginator.paginate.assert_called_once_with(cluster="test-cluster")
 232 | 
 233 |     @pytest.mark.anyio
 234 |     async def test_find_services_empty_response(self, mock_aws_clients):
 235 |         """Test with empty response from list_services."""
 236 |         mock_ecs = mock_aws_clients["ecs"]
 237 | 
 238 |         # Configure empty response with paginator
 239 |         paginator = mock.Mock()
 240 |         paginator.paginate.return_value = AsyncIterator([{"serviceArns": []}])
 241 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 242 | 
 243 |         # Mock boto3.client to return our mock client
 244 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 245 |             result = await find_services("test-cluster")
 246 | 
 247 |         # Assert empty result
 248 |         assert result == []
 249 |         mock_ecs.get_paginator.assert_called_once_with("list_services")
 250 |         paginator.paginate.assert_called_once_with(cluster="test-cluster")
 251 | 
 252 |     @pytest.mark.anyio
 253 |     async def test_find_services_missing_key(self, mock_aws_clients):
 254 |         """Test with missing 'serviceArns' key in response."""
 255 |         mock_ecs = mock_aws_clients["ecs"]
 256 | 
 257 |         # Configure response without serviceArns key
 258 |         paginator = mock.Mock()
 259 |         paginator.paginate.return_value = AsyncIterator([{}])
 260 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 261 | 
 262 |         # Mock boto3.client to return our mock client
 263 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 264 |             result = await find_services("test-cluster")
 265 | 
 266 |         # Assert empty result
 267 |         assert result == []
 268 |         mock_ecs.get_paginator.assert_called_once_with("list_services")
 269 |         paginator.paginate.assert_called_once_with(cluster="test-cluster")
 270 | 
 271 |     @pytest.mark.anyio
 272 |     async def test_find_services_with_invalid_arn(self, mock_aws_clients):
 273 |         """Test handling of invalid ARN format."""
 274 |         mock_ecs = mock_aws_clients["ecs"]
 275 | 
 276 |         # Configure response with invalid ARN
 277 |         paginator = mock.Mock()
 278 |         paginator.paginate.return_value = AsyncIterator(
 279 |             [
 280 |                 {
 281 |                     "serviceArns": [
 282 |                         "arn:aws:ecs:us-west-2:123456789012:service/test-cluster/valid-service",
 283 |                         "invalid-arn-format",
 284 |                     ]
 285 |                 }
 286 |             ]
 287 |         )
 288 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 289 | 
 290 |         # Mock boto3.client to return our mock client
 291 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 292 |             result = await find_services("test-cluster")
 293 | 
 294 |         # Should only include the valid ARN
 295 |         assert len(result) == 1
 296 |         assert "valid-service" in result
 297 |         mock_ecs.get_paginator.assert_called_once_with("list_services")
 298 |         paginator.paginate.assert_called_once_with(cluster="test-cluster")
 299 | 
 300 |     @pytest.mark.anyio
 301 |     async def test_find_services_with_client_error(self, mock_aws_clients):
 302 |         """Test ClientError exception handling in find_services."""
 303 |         mock_ecs = mock_aws_clients["ecs"]
 304 | 
 305 |         # Configure get_paginator to raise a ClientError
 306 |         error_response = {
 307 |             "Error": {"Code": "ClusterNotFoundException", "Message": "Cluster not found"}
 308 |         }
 309 |         mock_ecs.get_paginator.side_effect = ClientError(error_response, "list_services")
 310 | 
 311 |         # Mock boto3.client to return our mock client
 312 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 313 |             result = await find_services("nonexistent-cluster")
 314 | 
 315 |         # Should return empty list on ClientError
 316 |         assert result == []
 317 |         mock_ecs.get_paginator.assert_called_once_with("list_services")
 318 | 
 319 |     @pytest.mark.anyio
 320 |     async def test_find_services_with_general_exception(self, mock_aws_clients):
 321 |         """Test general exception handling in find_services."""
 322 |         mock_ecs = mock_aws_clients["ecs"]
 323 | 
 324 |         # Configure get_paginator to raise a general exception
 325 |         mock_ecs.get_paginator.side_effect = Exception("Test exception")
 326 | 
 327 |         # Mock boto3.client to return our mock client
 328 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 329 |             result = await find_services("test-cluster")
 330 | 
 331 |         # Should return empty list on general exception
 332 |         assert result == []
 333 |         mock_ecs.get_paginator.assert_called_once_with("list_services")
 334 | 
 335 |     @pytest.mark.anyio
 336 |     async def test_find_services_with_pagination(self, mock_aws_clients):
 337 |         """Test pagination handling in find_services."""
 338 |         mock_ecs = mock_aws_clients["ecs"]
 339 | 
 340 |         # Set up paginator mock for multiple pages
 341 |         paginator = mock.Mock()
 342 |         paginator.paginate.return_value = AsyncIterator(
 343 |             [
 344 |                 {
 345 |                     "serviceArns": [
 346 |                         "arn:aws:ecs:us-west-2:123456789012:service/test-cluster/service-page1"
 347 |                     ]
 348 |                 },
 349 |                 {
 350 |                     "serviceArns": [
 351 |                         "arn:aws:ecs:us-west-2:123456789012:service/test-cluster/service-page2"
 352 |                     ]
 353 |                 },
 354 |             ]
 355 |         )
 356 |         mock_ecs.get_paginator = mock.Mock(return_value=paginator)
 357 | 
 358 |         # Mock boto3.client to return our mock client
 359 |         with self.mock_aws_clients({"ecs": mock_ecs}):
 360 |             result = await find_services("test-cluster")
 361 | 
 362 |         # Should include results from all pages
 363 |         assert len(result) == 2
 364 |         assert "service-page1" in result
 365 |         assert "service-page2" in result
 366 |         mock_ecs.get_paginator.assert_called_once_with("list_services")
 367 |         paginator.paginate.assert_called_once_with(cluster="test-cluster")
 368 | 
 369 | 
 370 | class TestFindLoadBalancers(TestUtilsBase):
 371 |     """Test the find_load_balancers function in utils.py."""
 372 | 
 373 |     @pytest.mark.anyio
 374 |     async def test_find_load_balancers_success(self, mock_aws_clients):
 375 |         """Test successful retrieval of load balancers."""
 376 |         mock_ecs = mock_aws_clients["ecs"]
 377 |         mock_elbv2 = mock_aws_clients["elbv2"]
 378 | 
 379 |         # Mock service response
 380 |         mock_ecs.describe_services.return_value = {
 381 |             "services": [
 382 |                 {
 383 |                     "loadBalancers": [
 384 |                         {
 385 |                             "targetGroupArn": (
 386 |                                 "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/tg-1"
 387 |                             )
 388 |                         }
 389 |                     ]
 390 |                 }
 391 |             ]
 392 |         }
 393 | 
 394 |         # Mock target group response
 395 |         mock_elbv2.describe_target_groups.return_value = {
 396 |             "TargetGroups": [
 397 |                 {
 398 |                     "LoadBalancerArns": [
 399 |                         "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/lb-1"
 400 |                     ]
 401 |                 }
 402 |             ]
 403 |         }
 404 | 
 405 |         # Mock load balancer response
 406 |         mock_elbv2.describe_load_balancers.return_value = {
 407 |             "LoadBalancers": [
 408 |                 {
 409 |                     "LoadBalancerArn": (
 410 |                         "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/lb-1"
 411 |                     ),
 412 |                     "DNSName": "lb-1.us-west-2.elb.amazonaws.com",
 413 |                 }
 414 |             ]
 415 |         }
 416 | 
 417 |         # Mock boto3.client to return appropriate clients
 418 |         def mock_client_factory(service_name, **kwargs):
 419 |             if service_name == "ecs":
 420 |                 return mock_ecs
 421 |             elif service_name == "elbv2":
 422 |                 return mock_elbv2
 423 | 
 424 |         with self.mock_aws_clients({"ecs": mock_ecs, "elbv2": mock_elbv2}):
 425 |             result = await find_load_balancers("test-cluster", "test-service")
 426 | 
 427 |         # Assert expected result
 428 |         assert len(result) == 1
 429 |         assert "DNSName" in result[0]
 430 |         assert result[0]["DNSName"] == "lb-1.us-west-2.elb.amazonaws.com"
 431 |         mock_ecs.describe_services.assert_called_once_with(
 432 |             cluster="test-cluster", services=["test-service"]
 433 |         )
 434 |         mock_elbv2.describe_target_groups.assert_called_once_with(
 435 |             TargetGroupArns=["arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/tg-1"]
 436 |         )
 437 |         mock_elbv2.describe_load_balancers.assert_called_once()
 438 | 
 439 |     @pytest.mark.anyio
 440 |     async def test_find_load_balancers_service_not_found(self, mock_aws_clients):
 441 |         """Test when service is not found."""
 442 |         mock_ecs = mock_aws_clients["ecs"]
 443 |         mock_elbv2 = mock_aws_clients["elbv2"]
 444 | 
 445 |         # Mock empty service response
 446 |         mock_ecs.describe_services.return_value = {"services": []}
 447 | 
 448 |         # Mock boto3.client to return our mock clients
 449 |         with self.mock_aws_clients({"ecs": mock_ecs, "elbv2": mock_elbv2}):
 450 |             result = await find_load_balancers("test-cluster", "nonexistent-service")
 451 | 
 452 |         # Assert empty result
 453 |         assert result == []
 454 |         mock_ecs.describe_services.assert_called_once_with(
 455 |             cluster="test-cluster", services=["nonexistent-service"]
 456 |         )
 457 |         mock_elbv2.describe_target_groups.assert_not_called()
 458 | 
 459 |     @pytest.mark.anyio
 460 |     async def test_find_load_balancers_no_load_balancers(self, mock_aws_clients):
 461 |         """Test when service has no load balancers."""
 462 |         mock_ecs = mock_aws_clients["ecs"]
 463 |         mock_elbv2 = mock_aws_clients["elbv2"]
 464 | 
 465 |         # Mock service response with no load balancers
 466 |         mock_ecs.describe_services.return_value = {"services": [{"loadBalancers": []}]}
 467 | 
 468 |         # Mock boto3.client to return appropriate clients
 469 |         def mock_client_factory(service_name, **kwargs):
 470 |             if service_name == "ecs":
 471 |                 return mock_ecs
 472 |             elif service_name == "elbv2":
 473 |                 return mock_elbv2
 474 | 
 475 |         with self.mock_aws_clients({"ecs": mock_ecs, "elbv2": mock_elbv2}):
 476 |             result = await find_load_balancers("test-cluster", "test-service")
 477 | 
 478 |         # Assert empty result
 479 |         assert result == []
 480 |         mock_ecs.describe_services.assert_called_once_with(
 481 |             cluster="test-cluster", services=["test-service"]
 482 |         )
 483 |         mock_elbv2.describe_target_groups.assert_not_called()
 484 | 
 485 |     @pytest.mark.anyio
 486 |     async def test_find_load_balancers_no_target_groups(self, mock_aws_clients):
 487 |         """Test when load balancers have no target groups."""
 488 |         mock_ecs = mock_aws_clients["ecs"]
 489 |         mock_elbv2 = mock_aws_clients["elbv2"]
 490 | 
 491 |         # Mock service response with load balancers but no target group ARNs
 492 |         mock_ecs.describe_services.return_value = {
 493 |             "services": [
 494 |                 {
 495 |                     "loadBalancers": [{}]  # No targetGroupArn key
 496 |                 }
 497 |             ]
 498 |         }
 499 | 
 500 |         # Mock boto3.client to return appropriate clients
 501 |         def mock_client_factory(service_name, **kwargs):
 502 |             if service_name == "ecs":
 503 |                 return mock_ecs
 504 |             elif service_name == "elbv2":
 505 |                 return mock_elbv2
 506 | 
 507 |         with self.mock_aws_clients({"ecs": mock_ecs, "elbv2": mock_elbv2}):
 508 |             result = await find_load_balancers("test-cluster", "test-service")
 509 | 
 510 |         # Assert empty result
 511 |         assert result == []
 512 |         mock_ecs.describe_services.assert_called_once_with(
 513 |             cluster="test-cluster", services=["test-service"]
 514 |         )
 515 |         mock_elbv2.describe_target_groups.assert_not_called()
 516 | 
 517 |     @pytest.mark.anyio
 518 |     async def test_find_load_balancers_target_group_not_found(self, mock_aws_clients):
 519 |         """Test when target group is not found."""
 520 |         mock_ecs = mock_aws_clients["ecs"]
 521 |         mock_elbv2 = mock_aws_clients["elbv2"]
 522 | 
 523 |         # Mock service response
 524 |         mock_ecs.describe_services.return_value = {
 525 |             "services": [
 526 |                 {
 527 |                     "loadBalancers": [
 528 |                         {
 529 |                             "targetGroupArn": (
 530 |                                 "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/tg-1"
 531 |                             )
 532 |                         }
 533 |                     ]
 534 |                 }
 535 |             ]
 536 |         }
 537 | 
 538 |         # Mock empty target group response
 539 |         mock_elbv2.describe_target_groups.return_value = {"TargetGroups": []}
 540 | 
 541 |         # Mock boto3.client to return appropriate clients
 542 |         def mock_client_factory(service_name, **kwargs):
 543 |             if service_name == "ecs":
 544 |                 return mock_ecs
 545 |             elif service_name == "elbv2":
 546 |                 return mock_elbv2
 547 | 
 548 |         with mock.patch("boto3.client", side_effect=mock_client_factory):
 549 |             result = await find_load_balancers("test-cluster", "test-service")
 550 | 
 551 |         # Assert empty result
 552 |         assert result == []
 553 |         mock_ecs.describe_services.assert_called_once_with(
 554 |             cluster="test-cluster", services=["test-service"]
 555 |         )
 556 |         mock_elbv2.describe_target_groups.assert_called_once_with(
 557 |             TargetGroupArns=["arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/tg-1"]
 558 |         )
 559 | 
 560 |     @pytest.mark.anyio
 561 |     async def test_find_load_balancers_with_client_error(self, mock_aws_clients):
 562 |         """Test ClientError exception handling."""
 563 |         mock_ecs = mock_aws_clients["ecs"]
 564 |         mock_elbv2 = mock_aws_clients["elbv2"]
 565 | 
 566 |         # Mock client error
 567 |         error_response = {
 568 |             "Error": {"Code": "ClusterNotFoundException", "Message": "Cluster not found"}
 569 |         }
 570 |         mock_ecs.describe_services.side_effect = ClientError(error_response, "DescribeServices")
 571 | 
 572 |         # Mock boto3.client to return our mock clients
 573 |         with self.mock_aws_clients({"ecs": mock_ecs, "elbv2": mock_elbv2}):
 574 |             result = await find_load_balancers("nonexistent-cluster", "test-service")
 575 | 
 576 |         # Assert empty result
 577 |         assert result == []
 578 |         mock_ecs.describe_services.assert_called_once_with(
 579 |             cluster="nonexistent-cluster", services=["test-service"]
 580 |         )
 581 | 
 582 |     @pytest.mark.anyio
 583 |     async def test_find_load_balancers_with_general_exception(self, mock_aws_clients):
 584 |         """Test general exception handling."""
 585 |         mock_ecs = mock_aws_clients["ecs"]
 586 |         mock_elbv2 = mock_aws_clients["elbv2"]
 587 | 
 588 |         # Mock general exception
 589 |         mock_ecs.describe_services.side_effect = Exception("Test exception")
 590 | 
 591 |         # Mock boto3.client to return appropriate clients
 592 |         def mock_client_factory(service_name, **kwargs):
 593 |             if service_name == "ecs":
 594 |                 return mock_ecs
 595 |             elif service_name == "elbv2":
 596 |                 return mock_elbv2
 597 | 
 598 |         with self.mock_aws_clients({"ecs": mock_ecs, "elbv2": mock_elbv2}):
 599 |             result = await find_load_balancers("test-cluster", "test-service")
 600 | 
 601 |         # Assert empty result
 602 |         assert result == []
 603 |         mock_ecs.describe_services.assert_called_once_with(
 604 |             cluster="test-cluster", services=["test-service"]
 605 |         )
 606 | 
 607 | 
 608 | class TestFindTaskDefinitions(TestUtilsBase):
 609 |     """Test the find_task_definitions function in utils.py."""
 610 | 
 611 |     @pytest.mark.anyio
 612 |     async def test_find_task_definitions_by_service(self, mock_aws_clients):
 613 |         """Test finding task definitions by service name."""
 614 |         mock_ecs = mock_aws_clients["ecs"]
 615 | 
 616 |         # Mock the helper function to verify it's called
 617 |         with mock.patch(
 618 |             "awslabs.ecs_mcp_server.api.troubleshooting_tools.utils._get_task_definition_by_service",
 619 |             return_value=[
 620 |                 {
 621 |                     "taskDefinitionArn": (
 622 |                         "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 623 |                     )
 624 |                 }
 625 |             ],
 626 |         ) as mock_helper:
 627 |             # Mock boto3.client and call the function
 628 |             with self.mock_aws_clients({"ecs": mock_ecs}):
 629 |                 result = await find_task_definitions(
 630 |                     cluster_name="test-cluster", service_name="test-service"
 631 |                 )
 632 | 
 633 |             # Verify the helper was called with correct args
 634 |             mock_helper.assert_called_once_with("test-cluster", "test-service", mock_ecs)
 635 | 
 636 |             # Verify result
 637 |             assert len(result) == 1
 638 |             assert (
 639 |                 result[0]["taskDefinitionArn"]
 640 |                 == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 641 |             )
 642 | 
 643 |     @pytest.mark.anyio
 644 |     async def test_find_task_definitions_by_task(self, mock_aws_clients):
 645 |         """Test finding task definitions by task ID."""
 646 |         mock_ecs = mock_aws_clients["ecs"]
 647 | 
 648 |         # Mock the helper function
 649 |         with mock.patch(
 650 |             "awslabs.ecs_mcp_server.api.troubleshooting_tools.utils._get_task_definition_by_task",
 651 |             return_value=[
 652 |                 {
 653 |                     "taskDefinitionArn": (
 654 |                         "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 655 |                     )
 656 |                 }
 657 |             ],
 658 |         ) as mock_helper:
 659 |             # Mock boto3.client and call the function
 660 |             with self.mock_aws_clients({"ecs": mock_ecs}):
 661 |                 result = await find_task_definitions(
 662 |                     cluster_name="test-cluster", task_id="task-123"
 663 |                 )
 664 | 
 665 |             # Verify the helper was called with correct args
 666 |             mock_helper.assert_called_once_with("task-123", "test-cluster", mock_ecs)
 667 | 
 668 |             # Verify result
 669 |             assert len(result) == 1
 670 |             assert (
 671 |                 result[0]["taskDefinitionArn"]
 672 |                 == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 673 |             )
 674 | 
 675 |     @pytest.mark.anyio
 676 |     async def test_find_task_definitions_by_stack(self, mock_aws_clients):
 677 |         """Test finding task definitions by stack name."""
 678 |         mock_ecs = mock_aws_clients["ecs"]
 679 | 
 680 |         # Mock the helper function
 681 |         with mock.patch(
 682 |             "awslabs.ecs_mcp_server.api.troubleshooting_tools.utils._get_task_definitions_by_stack",
 683 |             return_value=[
 684 |                 {
 685 |                     "taskDefinitionArn": (
 686 |                         "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 687 |                     )
 688 |                 }
 689 |             ],
 690 |         ) as mock_helper:
 691 |             # Mock boto3.client and call the function
 692 |             with self.mock_aws_clients({"ecs": mock_ecs}):
 693 |                 result = await find_task_definitions(stack_name="test-stack")
 694 | 
 695 |             # Verify the helper was called with correct args
 696 |             mock_helper.assert_called_once_with("test-stack", mock_ecs)
 697 | 
 698 |             # Verify result
 699 |             assert len(result) == 1
 700 |             assert (
 701 |                 result[0]["taskDefinitionArn"]
 702 |                 == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 703 |             )
 704 | 
 705 |     @pytest.mark.anyio
 706 |     async def test_find_task_definitions_by_family_prefix(self, mock_aws_clients):
 707 |         """Test finding task definitions by family prefix."""
 708 |         mock_ecs = mock_aws_clients["ecs"]
 709 | 
 710 |         # Mock the helper function
 711 |         with mock.patch(
 712 |             "awslabs.ecs_mcp_server.api.troubleshooting_tools.utils._get_task_definitions_by_family_prefix",
 713 |             return_value=[
 714 |                 {
 715 |                     "taskDefinitionArn": (
 716 |                         "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 717 |                     )
 718 |                 }
 719 |             ],
 720 |         ) as mock_helper:
 721 |             # Mock boto3.client and call the function
 722 |             with self.mock_aws_clients({"ecs": mock_ecs}):
 723 |                 result = await find_task_definitions(family_prefix="test-app")
 724 | 
 725 |             # Verify the helper was called with correct args
 726 |             mock_helper.assert_called_once_with("test-app", mock_ecs)
 727 | 
 728 |             # Verify result
 729 |             assert len(result) == 1
 730 |             assert (
 731 |                 result[0]["taskDefinitionArn"]
 732 |                 == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 733 |             )
 734 | 
 735 |     @pytest.mark.anyio
 736 |     async def test_find_task_definitions_missing_required_params(self, mock_aws_clients):
 737 |         """Test with missing required parameters."""
 738 | 
 739 |         # Call the function without any of the required parameters
 740 |         result = await find_task_definitions()
 741 | 
 742 |         # Should return empty list when missing required params
 743 |         assert result == []
 744 | 
 745 |     @pytest.mark.anyio
 746 |     async def test_find_task_definitions_with_exception(self, mock_aws_clients):
 747 |         """Test exception handling in find_task_definitions."""
 748 |         mock_ecs = mock_aws_clients["ecs"]
 749 | 
 750 |         # Mock the helper function to raise an exception
 751 |         with mock.patch(
 752 |             "awslabs.ecs_mcp_server.api.troubleshooting_tools.utils._get_task_definition_by_service",
 753 |             side_effect=Exception("Test exception"),
 754 |         ):
 755 |             # Mock boto3.client and call the function
 756 |             with self.mock_aws_clients({"ecs": mock_ecs}):
 757 |                 result = await find_task_definitions(
 758 |                     cluster_name="test-cluster", service_name="test-service"
 759 |                 )
 760 | 
 761 |             # Should return empty list on exception
 762 |             assert result == []
 763 | 
 764 | 
 765 | class TestGetTaskDefinitionByService(TestUtilsBase):
 766 |     """Test the _get_task_definition_by_service helper function."""
 767 | 
 768 |     @pytest.mark.anyio
 769 |     async def test_get_task_definition_by_service_success(self, mock_aws_clients):
 770 |         """Test successful retrieval of task definition by service."""
 771 |         mock_ecs = mock_aws_clients["ecs"]
 772 | 
 773 |         # Mock service response
 774 |         mock_ecs.describe_services.return_value = {
 775 |             "services": [
 776 |                 {"taskDefinition": "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"}
 777 |             ]
 778 |         }
 779 | 
 780 |         # Mock task definition response
 781 |         mock_ecs.describe_task_definition.return_value = {
 782 |             "taskDefinition": {
 783 |                 "taskDefinitionArn": (
 784 |                     "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 785 |                 ),
 786 |                 "family": "test-app",
 787 |                 "revision": 1,
 788 |             }
 789 |         }
 790 | 
 791 |         # Call the function
 792 |         result = await _get_task_definition_by_service("test-cluster", "test-service", mock_ecs)
 793 | 
 794 |         # Assert expected result
 795 |         assert len(result) == 1
 796 |         assert (
 797 |             result[0]["taskDefinitionArn"]
 798 |             == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 799 |         )
 800 |         assert result[0]["family"] == "test-app"
 801 |         assert result[0]["revision"] == 1
 802 | 
 803 |         # Verify correct API calls
 804 |         mock_ecs.describe_services.assert_called_once_with(
 805 |             cluster="test-cluster", services=["test-service"]
 806 |         )
 807 |         mock_ecs.describe_task_definition.assert_called_once_with(
 808 |             taskDefinition="arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 809 |         )
 810 | 
 811 |     @pytest.mark.anyio
 812 |     async def test_get_task_definition_by_service_not_found(self, mock_aws_clients):
 813 |         """Test when service is not found."""
 814 |         mock_ecs = mock_aws_clients["ecs"]
 815 | 
 816 |         # Mock empty service response
 817 |         mock_ecs.describe_services.return_value = {"services": []}
 818 | 
 819 |         # Call the function
 820 |         result = await _get_task_definition_by_service(
 821 |             "test-cluster", "nonexistent-service", mock_ecs
 822 |         )
 823 | 
 824 |         # Assert empty result
 825 |         assert result == []
 826 | 
 827 |         # Verify API calls
 828 |         mock_ecs.describe_services.assert_called_once_with(
 829 |             cluster="test-cluster", services=["nonexistent-service"]
 830 |         )
 831 |         mock_ecs.describe_task_definition.assert_not_called()
 832 | 
 833 |     @pytest.mark.anyio
 834 |     async def test_get_task_definition_by_service_no_task_definition(self, mock_aws_clients):
 835 |         """Test when service doesn't have task definition."""
 836 |         mock_ecs = mock_aws_clients["ecs"]
 837 | 
 838 |         # Mock service response without taskDefinition
 839 |         mock_ecs.describe_services.return_value = {
 840 |             "services": [{}]  # No taskDefinition key
 841 |         }
 842 | 
 843 |         # Call the function
 844 |         result = await _get_task_definition_by_service("test-cluster", "test-service", mock_ecs)
 845 | 
 846 |         # Assert empty result
 847 |         assert result == []
 848 | 
 849 |         # Verify API calls
 850 |         mock_ecs.describe_services.assert_called_once_with(
 851 |             cluster="test-cluster", services=["test-service"]
 852 |         )
 853 |         mock_ecs.describe_task_definition.assert_not_called()
 854 | 
 855 |     @pytest.mark.anyio
 856 |     async def test_get_task_definition_by_service_client_error(self, mock_aws_clients):
 857 |         """Test ClientError handling."""
 858 |         mock_ecs = mock_aws_clients["ecs"]
 859 | 
 860 |         # Mock client error
 861 |         error_response = {
 862 |             "Error": {"Code": "ClusterNotFoundException", "Message": "Cluster not found"}
 863 |         }
 864 |         mock_ecs.describe_services.side_effect = ClientError(error_response, "DescribeServices")
 865 | 
 866 |         # Call the function
 867 |         result = await _get_task_definition_by_service(
 868 |             "nonexistent-cluster", "test-service", mock_ecs
 869 |         )
 870 | 
 871 |         # Assert empty result
 872 |         assert result == []
 873 | 
 874 |         # Verify API calls
 875 |         mock_ecs.describe_services.assert_called_once_with(
 876 |             cluster="nonexistent-cluster", services=["test-service"]
 877 |         )
 878 |         mock_ecs.describe_task_definition.assert_not_called()
 879 | 
 880 |     @pytest.mark.anyio
 881 |     async def test_get_task_definition_by_service_general_exception(self, mock_aws_clients):
 882 |         """Test general exception handling."""
 883 |         mock_ecs = mock_aws_clients["ecs"]
 884 | 
 885 |         # Mock general exception
 886 |         mock_ecs.describe_services.side_effect = Exception("Test exception")
 887 | 
 888 |         # Call the function
 889 |         result = await _get_task_definition_by_service("test-cluster", "test-service", mock_ecs)
 890 | 
 891 |         # Assert empty result
 892 |         assert result == []
 893 | 
 894 |         # Verify API calls
 895 |         mock_ecs.describe_services.assert_called_once_with(
 896 |             cluster="test-cluster", services=["test-service"]
 897 |         )
 898 |         mock_ecs.describe_task_definition.assert_not_called()
 899 | 
 900 | 
 901 | class TestGetTaskDefinitionByTask(TestUtilsBase):
 902 |     """Test the _get_task_definition_by_task helper function."""
 903 | 
 904 |     @pytest.mark.anyio
 905 |     async def test_get_task_definition_by_task_success(self, mock_aws_clients):
 906 |         """Test successful retrieval of task definition by task ID."""
 907 |         mock_ecs = mock_aws_clients["ecs"]
 908 | 
 909 |         # Mock task response
 910 |         mock_ecs.describe_tasks.return_value = {
 911 |             "tasks": [
 912 |                 {
 913 |                     "taskDefinitionArn": (
 914 |                         "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 915 |                     )
 916 |                 }
 917 |             ]
 918 |         }
 919 | 
 920 |         # Mock task definition response
 921 |         mock_ecs.describe_task_definition.return_value = {
 922 |             "taskDefinition": {
 923 |                 "taskDefinitionArn": (
 924 |                     "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 925 |                 ),
 926 |                 "family": "test-app",
 927 |                 "revision": 1,
 928 |             }
 929 |         }
 930 | 
 931 |         # Call the function
 932 |         result = await _get_task_definition_by_task("task-123", "test-cluster", mock_ecs)
 933 | 
 934 |         # Assert expected result
 935 |         assert len(result) == 1
 936 |         assert (
 937 |             result[0]["taskDefinitionArn"]
 938 |             == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 939 |         )
 940 |         assert result[0]["family"] == "test-app"
 941 |         assert result[0]["revision"] == 1
 942 | 
 943 |         # Verify correct API calls
 944 |         mock_ecs.describe_tasks.assert_called_once_with(cluster="test-cluster", tasks=["task-123"])
 945 |         mock_ecs.describe_task_definition.assert_called_once_with(
 946 |             taskDefinition="arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
 947 |         )
 948 | 
 949 |     @pytest.mark.anyio
 950 |     async def test_get_task_definition_by_task_not_found(self, mock_aws_clients):
 951 |         """Test when task is not found."""
 952 |         mock_ecs = mock_aws_clients["ecs"]
 953 | 
 954 |         # Mock empty task response
 955 |         mock_ecs.describe_tasks.return_value = {"tasks": []}
 956 | 
 957 |         # Call the function
 958 |         result = await _get_task_definition_by_task("nonexistent-task", "test-cluster", mock_ecs)
 959 | 
 960 |         # Assert empty result
 961 |         assert result == []
 962 | 
 963 |         # Verify API calls
 964 |         mock_ecs.describe_tasks.assert_called_once_with(
 965 |             cluster="test-cluster", tasks=["nonexistent-task"]
 966 |         )
 967 |         mock_ecs.describe_task_definition.assert_not_called()
 968 | 
 969 |     @pytest.mark.anyio
 970 |     async def test_get_task_definition_by_task_no_arn(self, mock_aws_clients):
 971 |         """Test when task doesn't have task definition ARN."""
 972 |         mock_ecs = mock_aws_clients["ecs"]
 973 | 
 974 |         # Mock task response without taskDefinitionArn
 975 |         mock_ecs.describe_tasks.return_value = {
 976 |             "tasks": [{}]  # No taskDefinitionArn key
 977 |         }
 978 | 
 979 |         # Call the function
 980 |         result = await _get_task_definition_by_task("task-123", "test-cluster", mock_ecs)
 981 | 
 982 |         # Assert empty result
 983 |         assert result == []
 984 | 
 985 |         # Verify API calls
 986 |         mock_ecs.describe_tasks.assert_called_once_with(cluster="test-cluster", tasks=["task-123"])
 987 |         mock_ecs.describe_task_definition.assert_not_called()
 988 | 
 989 |     @pytest.mark.anyio
 990 |     async def test_get_task_definition_by_task_client_error(self, mock_aws_clients):
 991 |         """Test ClientError handling."""
 992 |         mock_ecs = mock_aws_clients["ecs"]
 993 | 
 994 |         # Mock client error
 995 |         error_response = {
 996 |             "Error": {"Code": "ClusterNotFoundException", "Message": "Cluster not found"}
 997 |         }
 998 |         mock_ecs.describe_tasks.side_effect = ClientError(error_response, "DescribeTasks")
 999 | 
1000 |         # Call the function
1001 |         result = await _get_task_definition_by_task("task-123", "nonexistent-cluster", mock_ecs)
1002 | 
1003 |         # Assert empty result
1004 |         assert result == []
1005 | 
1006 |         # Verify API calls
1007 |         mock_ecs.describe_tasks.assert_called_once_with(
1008 |             cluster="nonexistent-cluster", tasks=["task-123"]
1009 |         )
1010 |         mock_ecs.describe_task_definition.assert_not_called()
1011 | 
1012 |     @pytest.mark.anyio
1013 |     async def test_get_task_definition_by_task_general_exception(self, mock_aws_clients):
1014 |         """Test general exception handling."""
1015 |         mock_ecs = mock_aws_clients["ecs"]
1016 | 
1017 |         # Mock general exception
1018 |         mock_ecs.describe_tasks.side_effect = Exception("Test exception")
1019 | 
1020 |         # Call the function
1021 |         result = await _get_task_definition_by_task("task-123", "test-cluster", mock_ecs)
1022 | 
1023 |         # Assert empty result
1024 |         assert result == []
1025 | 
1026 |         # Verify API calls
1027 |         mock_ecs.describe_tasks.assert_called_once_with(cluster="test-cluster", tasks=["task-123"])
1028 |         mock_ecs.describe_task_definition.assert_not_called()
1029 | 
1030 | 
1031 | class TestGetTaskDefinitionsByStack(TestUtilsBase):
1032 |     """Test the _get_task_definitions_by_stack helper function."""
1033 | 
1034 |     @pytest.mark.anyio
1035 |     async def test_get_task_definitions_by_stack_success(self, mock_aws_clients):
1036 |         """Test successful retrieval of task definitions by stack name."""
1037 |         mock_ecs = mock_aws_clients["ecs"]
1038 |         mock_cfn = mock_aws_clients["cloudformation"]
1039 | 
1040 |         # Fix the CloudFormation mock properly
1041 |         mock_cfn.list_stack_resources = mock.MagicMock(
1042 |             return_value={
1043 |                 "StackResourceSummaries": [
1044 |                     {
1045 |                         "ResourceType": "AWS::ECS::TaskDefinition",
1046 |                         "PhysicalResourceId": (
1047 |                             "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1048 |                         ),
1049 |                     },
1050 |                     {
1051 |                         "ResourceType": "AWS::ECS::Cluster",
1052 |                         "PhysicalResourceId": (
1053 |                             "arn:aws:ecs:us-west-2:123456789012:cluster/test-cluster"
1054 |                         ),
1055 |                     },
1056 |                 ]
1057 |             }
1058 |         )
1059 | 
1060 |         # Mock task definition response
1061 |         mock_ecs.describe_task_definition.return_value = {
1062 |             "taskDefinition": {
1063 |                 "taskDefinitionArn": (
1064 |                     "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1065 |                 ),
1066 |                 "family": "test-app",
1067 |                 "revision": 1,
1068 |             }
1069 |         }
1070 | 
1071 |         # Mock boto3.client and call the function
1072 |         with self.mock_aws_clients({"ecs": mock_ecs, "cloudformation": mock_cfn}):
1073 |             result = await _get_task_definitions_by_stack("test-stack", mock_ecs)
1074 | 
1075 |         # Assert expected result
1076 |         assert len(result) == 1
1077 |         assert (
1078 |             result[0]["taskDefinitionArn"]
1079 |             == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1080 |         )
1081 |         assert result[0]["family"] == "test-app"
1082 |         assert result[0]["revision"] == 1
1083 | 
1084 |         # Verify correct API calls
1085 |         mock_cfn.list_stack_resources.assert_called_once_with(StackName="test-stack")
1086 |         mock_ecs.describe_task_definition.assert_called_once_with(
1087 |             taskDefinition="arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1088 |         )
1089 | 
1090 |     @pytest.mark.anyio
1091 |     async def test_get_task_definitions_by_stack_no_task_definitions(self, mock_aws_clients):
1092 |         """Test when no task definitions are found in the stack resources."""
1093 |         mock_ecs = mock_aws_clients["ecs"]
1094 |         mock_cfn = mock_aws_clients["cloudformation"]
1095 | 
1096 |         # Configure CloudFormation mock with no task definitions
1097 |         mock_cfn.list_stack_resources.return_value = {
1098 |             "StackResourceSummaries": [
1099 |                 {
1100 |                     "ResourceType": "AWS::ECS::Cluster",
1101 |                     "PhysicalResourceId": "arn:aws:ecs:us-west-2:123456789012:cluster/test-cluster",
1102 |                 },
1103 |                 {"ResourceType": "AWS::EC2::SecurityGroup", "PhysicalResourceId": "sg-12345"},
1104 |             ]
1105 |         }
1106 | 
1107 |         # Mock boto3.client and call the function
1108 |         with self.mock_aws_clients({"ecs": mock_ecs, "cloudformation": mock_cfn}):
1109 |             result = await _get_task_definitions_by_stack("test-stack", mock_ecs)
1110 | 
1111 |         # Assert expected result
1112 |         assert len(result) == 0
1113 | 
1114 |         # Verify correct API calls
1115 |         mock_cfn.list_stack_resources.assert_called_once_with(StackName="test-stack")
1116 |         mock_ecs.describe_task_definition.assert_not_called()
1117 | 
1118 |     @pytest.mark.anyio
1119 |     async def test_get_task_definitions_by_stack_empty_stack(self, mock_aws_clients):
1120 |         """Test when the stack has no resources."""
1121 |         mock_ecs = mock_aws_clients["ecs"]
1122 |         mock_cfn = mock_aws_clients["cloudformation"]
1123 | 
1124 |         # Mock empty stack resources
1125 |         mock_cfn.list_stack_resources = mock.MagicMock(return_value={"StackResourceSummaries": []})
1126 | 
1127 |         # Mock boto3.client and call the function
1128 |         with self.mock_aws_clients({"ecs": mock_ecs, "cloudformation": mock_cfn}):
1129 |             result = await _get_task_definitions_by_stack("test-stack", mock_ecs)
1130 | 
1131 |         # Assert expected result
1132 |         assert len(result) == 0
1133 | 
1134 |         # Verify correct API calls
1135 |         mock_cfn.list_stack_resources.assert_called_once_with(StackName="test-stack")
1136 |         mock_ecs.describe_task_definition.assert_not_called()
1137 | 
1138 |     @pytest.mark.anyio
1139 |     async def test_get_task_definitions_by_stack_cloudformation_error(self, mock_aws_clients):
1140 |         """Test when CloudFormation client raises a ClientError."""
1141 |         mock_ecs = mock_aws_clients["ecs"]
1142 |         mock_cfn = mock_aws_clients["cloudformation"]
1143 | 
1144 |         # Mock ClientError for list_stack_resources
1145 |         error_response = {"Error": {"Code": "ValidationError", "Message": "Stack does not exist"}}
1146 |         mock_cfn.list_stack_resources = mock.MagicMock(
1147 |             side_effect=ClientError(error_response, "ListStackResources")
1148 |         )
1149 | 
1150 |         # Mock boto3.client and call the function
1151 |         with self.mock_aws_clients({"ecs": mock_ecs, "cloudformation": mock_cfn}):
1152 |             result = await _get_task_definitions_by_stack("test-stack", mock_ecs)
1153 | 
1154 |         # Assert expected result
1155 |         assert len(result) == 0
1156 | 
1157 |         # Verify correct API calls
1158 |         mock_cfn.list_stack_resources.assert_called_once_with(StackName="test-stack")
1159 |         mock_ecs.describe_task_definition.assert_not_called()
1160 | 
1161 |     @pytest.mark.anyio
1162 |     async def test_get_task_definitions_by_stack_ecs_error(self, mock_aws_clients):
1163 |         """Test when ECS client raises a ClientError during task definition retrieval."""
1164 |         mock_ecs = mock_aws_clients["ecs"]
1165 |         mock_cfn = mock_aws_clients["cloudformation"]
1166 | 
1167 |         # Mock stack resources with task definition
1168 |         mock_cfn.list_stack_resources = mock.MagicMock(
1169 |             return_value={
1170 |                 "StackResourceSummaries": [
1171 |                     {
1172 |                         "ResourceType": "AWS::ECS::TaskDefinition",
1173 |                         "PhysicalResourceId": (
1174 |                             "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1175 |                         ),
1176 |                     }
1177 |                 ]
1178 |             }
1179 |         )
1180 | 
1181 |         # Mock ClientError for describe_task_definition
1182 |         error_response = {
1183 |             "Error": {"Code": "ClientException", "Message": "Task definition not found"}
1184 |         }
1185 |         mock_ecs.describe_task_definition = mock.MagicMock(
1186 |             side_effect=ClientError(error_response, "DescribeTaskDefinition")
1187 |         )
1188 | 
1189 |         # Mock boto3.client and call the function
1190 |         with self.mock_aws_clients({"ecs": mock_ecs, "cloudformation": mock_cfn}):
1191 |             result = await _get_task_definitions_by_stack("test-stack", mock_ecs)
1192 | 
1193 |         # Assert expected result
1194 |         assert len(result) == 0
1195 | 
1196 |         # Verify correct API calls
1197 |         mock_cfn.list_stack_resources.assert_called_once_with(StackName="test-stack")
1198 |         mock_ecs.describe_task_definition.assert_called_once_with(
1199 |             taskDefinition="arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1200 |         )
1201 | 
1202 |     @pytest.mark.anyio
1203 |     async def test_get_task_definitions_by_stack_general_exception(self, mock_aws_clients):
1204 |         """Test when a general exception occurs."""
1205 |         mock_ecs = mock_aws_clients["ecs"]
1206 |         mock_cfn = mock_aws_clients["cloudformation"]
1207 | 
1208 |         # Mock general exception
1209 |         mock_cfn.list_stack_resources = mock.MagicMock(side_effect=Exception("Unexpected error"))
1210 | 
1211 |         # Mock boto3.client and call the function
1212 |         with self.mock_aws_clients({"ecs": mock_ecs, "cloudformation": mock_cfn}):
1213 |             result = await _get_task_definitions_by_stack("test-stack", mock_ecs)
1214 | 
1215 |         # Assert expected result
1216 |         assert len(result) == 0
1217 | 
1218 |         # Verify correct API calls
1219 |         mock_cfn.list_stack_resources.assert_called_once_with(StackName="test-stack")
1220 |         mock_ecs.describe_task_definition.assert_not_called()
1221 | 
1222 | 
1223 | class TestGetTaskDefinitionsByFamilyPrefix(TestUtilsBase):
1224 |     """Test the _get_task_definitions_by_family_prefix helper function."""
1225 | 
1226 |     @pytest.mark.anyio
1227 |     async def test_get_task_definitions_by_family_prefix_success(self, mock_aws_clients):
1228 |         """Test successful retrieval of task definitions by family prefix."""
1229 |         mock_ecs = mock_aws_clients["ecs"]
1230 | 
1231 |         # Step 1: Mock list_task_definition_families response
1232 |         mock_ecs.list_task_definition_families.return_value = {
1233 |             "families": ["test-app", "test-app-2"]
1234 |         }
1235 | 
1236 |         # Step 2: Mock list_task_definitions responses for each family
1237 |         mock_ecs.list_task_definitions.side_effect = [
1238 |             {
1239 |                 "taskDefinitionArns": [
1240 |                     "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1241 |                 ]
1242 |             },
1243 |             {
1244 |                 "taskDefinitionArns": [
1245 |                     "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app-2:1"
1246 |                 ]
1247 |             },
1248 |         ]
1249 | 
1250 |         # Step 3: Mock describe_task_definition responses
1251 |         mock_ecs.describe_task_definition.side_effect = [
1252 |             {
1253 |                 "taskDefinition": {
1254 |                     "taskDefinitionArn": (
1255 |                         "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1256 |                     ),
1257 |                     "family": "test-app",
1258 |                     "revision": 1,
1259 |                 }
1260 |             },
1261 |             {
1262 |                 "taskDefinition": {
1263 |                     "taskDefinitionArn": (
1264 |                         "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app-2:1"
1265 |                     ),
1266 |                     "family": "test-app-2",
1267 |                     "revision": 1,
1268 |                 }
1269 |             },
1270 |         ]
1271 | 
1272 |         # Call the function
1273 |         result = await _get_task_definitions_by_family_prefix("test-app", mock_ecs)
1274 | 
1275 |         # Assert expected result
1276 |         assert len(result) == 2
1277 |         assert (
1278 |             result[0]["taskDefinitionArn"]
1279 |             == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1280 |         )
1281 |         assert result[0]["family"] == "test-app"
1282 |         assert result[0]["revision"] == 1
1283 |         assert (
1284 |             result[1]["taskDefinitionArn"]
1285 |             == "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app-2:1"
1286 |         )
1287 |         assert result[1]["family"] == "test-app-2"
1288 |         assert result[1]["revision"] == 1
1289 | 
1290 |         # Verify correct API calls
1291 |         mock_ecs.list_task_definition_families.assert_called_once_with(
1292 |             familyPrefix="test-app", status="ACTIVE"
1293 |         )
1294 |         assert mock_ecs.list_task_definitions.call_count == 2
1295 |         mock_ecs.list_task_definitions.assert_any_call(
1296 |             familyPrefix="test-app", status="ACTIVE", sort="DESC", maxResults=1
1297 |         )
1298 |         mock_ecs.list_task_definitions.assert_any_call(
1299 |             familyPrefix="test-app-2", status="ACTIVE", sort="DESC", maxResults=1
1300 |         )
1301 |         assert mock_ecs.describe_task_definition.call_count == 2
1302 |         mock_ecs.describe_task_definition.assert_any_call(
1303 |             taskDefinition="arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1304 |         )
1305 |         mock_ecs.describe_task_definition.assert_any_call(
1306 |             taskDefinition="arn:aws:ecs:us-west-2:123456789012:task-definition/test-app-2:1"
1307 |         )
1308 | 
1309 |     @pytest.mark.anyio
1310 |     async def test_get_task_definitions_by_family_prefix_empty_families(self, mock_aws_clients):
1311 |         """Test with empty families response."""
1312 |         mock_ecs = mock_aws_clients["ecs"]
1313 | 
1314 |         # Configure empty families response
1315 |         mock_ecs.list_task_definition_families = mock.MagicMock(return_value={"families": []})
1316 | 
1317 |         # Call the function
1318 |         result = await _get_task_definitions_by_family_prefix("nonexistent-prefix", mock_ecs)
1319 | 
1320 |         # Assert empty result
1321 |         assert result == []
1322 | 
1323 |         # Verify correct API calls
1324 |         mock_ecs.list_task_definition_families.assert_called_once_with(
1325 |             familyPrefix="nonexistent-prefix", status="ACTIVE"
1326 |         )
1327 |         mock_ecs.list_task_definitions.assert_not_called()
1328 |         mock_ecs.describe_task_definition.assert_not_called()
1329 | 
1330 | 
1331 | class TestDetectCloudFormationStack(TestUtilsBase):
1332 |     """Test the detect_cloudformation_stack function in utils.py."""
1333 | 
1334 |     @pytest.mark.anyio
1335 |     async def test_detect_cloudformation_stack_success(self, mock_aws_clients):
1336 |         """Test successful CloudFormation stack detection."""
1337 |         mock_ecs = mock_aws_clients["ecs"]
1338 |         mock_cfn = mock_aws_clients["cloudformation"]
1339 | 
1340 |         # Mock tags response
1341 |         mock_ecs.list_tags_for_resource.return_value = {
1342 |             "tags": [
1343 |                 {"key": "aws:cloudformation:stack-name", "value": "test-stack"},
1344 |                 {
1345 |                     "key": "aws:cloudformation:stack-id",
1346 |                     "value": "arn:aws:cloudformation:us-west-2:123456789012:stack/test-stack/12345",
1347 |                 },
1348 |             ]
1349 |         }
1350 | 
1351 |         # Mock CloudFormation stack details
1352 |         mock_cfn.describe_stacks.return_value = {
1353 |             "Stacks": [
1354 |                 {
1355 |                     "StackName": "test-stack",
1356 |                     "StackStatus": "CREATE_COMPLETE",
1357 |                     "CreationTime": "2023-01-01T00:00:00Z",
1358 |                     "LastUpdatedTime": "2023-01-01T01:00:00Z",
1359 |                 }
1360 |             ]
1361 |         }
1362 | 
1363 |         # Mock boto3.client to return appropriate clients
1364 |         def mock_client_factory(service_name, **kwargs):
1365 |             if service_name == "ecs":
1366 |                 return mock_ecs
1367 |             elif service_name == "cloudformation":
1368 |                 return mock_cfn
1369 | 
1370 |         with self.mock_aws_clients({"ecs": mock_ecs, "cloudformation": mock_cfn}):
1371 |             result = await get_cloudformation_stack_if_exists(
1372 |                 "arn:aws:ecs:us-west-2:123456789012:cluster/test-cluster"
1373 |             )
1374 | 
1375 |         # Verify CloudFormation stack is detected
1376 |         assert result is not None
1377 |         assert result["stack_name"] == "test-stack"
1378 |         assert result["stack_status"] == "CREATE_COMPLETE"
1379 |         assert "stack_id" in result
1380 |         assert "creation_time" in result
1381 | 
1382 |     @pytest.mark.anyio
1383 |     async def test_detect_cloudformation_stack_no_tags(self, mock_aws_clients):
1384 |         """Test when resource has no CloudFormation tags."""
1385 |         mock_ecs = mock_aws_clients["ecs"]
1386 | 
1387 |         # Mock empty tags response
1388 |         mock_ecs.list_tags_for_resource.return_value = {"tags": []}
1389 | 
1390 |         result = await get_cloudformation_stack_if_exists(
1391 |             "arn:aws:ecs:us-west-2:123456789012:cluster/test-cluster",
1392 |         )
1393 | 
1394 |         # Should return None when no CloudFormation tags found
1395 |         assert result is None
1396 | 
1397 |     @pytest.mark.anyio
1398 |     async def test_detect_cloudformation_stack_no_stack_name_tag(self, mock_aws_clients):
1399 |         """Test when resource has tags but no stack name tag."""
1400 |         mock_ecs = mock_aws_clients["ecs"]
1401 | 
1402 |         # Mock tags response without stack name
1403 |         mock_ecs.list_tags_for_resource.return_value = {
1404 |             "tags": [
1405 |                 {"key": "Environment", "value": "production"},
1406 |                 {"key": "Team", "value": "backend"},
1407 |             ]
1408 |         }
1409 | 
1410 |         result = await get_cloudformation_stack_if_exists(
1411 |             "arn:aws:ecs:us-west-2:123456789012:cluster/test-cluster",
1412 |         )
1413 | 
1414 |         # Should return None when no stack name tag found
1415 |         assert result is None
1416 | 
1417 |     @pytest.mark.anyio
1418 |     async def test_detect_cloudformation_stack_cfn_error(self, mock_aws_clients):
1419 |         """Test CloudFormation error during stack description."""
1420 |         mock_ecs = mock_aws_clients["ecs"]
1421 |         mock_cfn = mock_aws_clients["cloudformation"]
1422 | 
1423 |         # Mock tags response
1424 |         mock_ecs.list_tags_for_resource.return_value = {
1425 |             "tags": [{"key": "aws:cloudformation:stack-name", "value": "test-stack"}]
1426 |         }
1427 | 
1428 |         # Mock CloudFormation error
1429 |         error_response = {"Error": {"Code": "ValidationError", "Message": "Stack not found"}}
1430 |         mock_cfn.describe_stacks.side_effect = ClientError(error_response, "DescribeStacks")
1431 | 
1432 |         # Mock boto3.client to return appropriate clients
1433 |         with self.mock_aws_clients({"ecs": mock_ecs, "cloudformation": mock_cfn}):
1434 |             result = await get_cloudformation_stack_if_exists(
1435 |                 "arn:aws:ecs:us-west-2:123456789012:cluster/test-cluster"
1436 |             )
1437 | 
1438 |         # Should return error information
1439 |         assert result is not None
1440 |         assert result["stack_name"] == "test-stack"
1441 |         assert result["stack_status"] == "UNKNOWN"
1442 |         assert "error" in result
1443 | 
1444 |     @pytest.mark.anyio
1445 |     async def test_detect_cloudformation_stack_tags_error(self, mock_aws_clients):
1446 |         """Test error during tag listing."""
1447 |         mock_ecs = mock_aws_clients["ecs"]
1448 | 
1449 |         # Mock exception in tag listing
1450 |         mock_ecs.list_tags_for_resource.side_effect = Exception("Tag listing error")
1451 | 
1452 |         result = await get_cloudformation_stack_if_exists(
1453 |             "arn:aws:ecs:us-west-2:123456789012:cluster/test-cluster",
1454 |         )
1455 | 
1456 |         # Should return None when tag listing fails
1457 |         assert result is None
1458 | 
1459 |     @pytest.mark.anyio
1460 |     async def test_detect_cloudformation_stack_empty_stacks(self, mock_aws_clients):
1461 |         """Test when CloudFormation returns empty stacks."""
1462 |         mock_ecs = mock_aws_clients["ecs"]
1463 |         mock_cfn = mock_aws_clients["cloudformation"]
1464 | 
1465 |         # Mock tags response
1466 |         mock_ecs.list_tags_for_resource.return_value = {
1467 |             "tags": [{"key": "aws:cloudformation:stack-name", "value": "test-stack"}]
1468 |         }
1469 | 
1470 |         # Mock empty CloudFormation response
1471 |         mock_cfn.describe_stacks.return_value = {"Stacks": []}
1472 | 
1473 |         result = await get_cloudformation_stack_if_exists(
1474 |             "arn:aws:ecs:us-west-2:123456789012:cluster/test-cluster",
1475 |         )
1476 | 
1477 |         # Should return None when no stacks found
1478 |         assert result is None
1479 | 
1480 |     @pytest.mark.anyio
1481 |     async def test_get_task_definitions_by_family_prefix_missing_key(self, mock_aws_clients):
1482 |         """Test with missing 'families' key in response."""
1483 |         mock_ecs = mock_aws_clients["ecs"]
1484 | 
1485 |         # Configure response without families key
1486 |         mock_ecs.list_task_definition_families = mock.MagicMock(return_value={})
1487 | 
1488 |         # Call the function
1489 |         result = await _get_task_definitions_by_family_prefix("test-app", mock_ecs)
1490 | 
1491 |         # Assert empty result
1492 |         assert result == []
1493 | 
1494 |         # Verify correct API calls
1495 |         mock_ecs.list_task_definition_families.assert_called_once_with(
1496 |             familyPrefix="test-app", status="ACTIVE"
1497 |         )
1498 |         mock_ecs.list_task_definitions.assert_not_called()
1499 |         mock_ecs.describe_task_definition.assert_not_called()
1500 | 
1501 |     @pytest.mark.anyio
1502 |     async def test_get_task_definitions_by_family_prefix_no_task_definitions(
1503 |         self, mock_aws_clients
1504 |     ):
1505 |         """Test when no task definitions are found for a family."""
1506 |         mock_ecs = mock_aws_clients["ecs"]
1507 | 
1508 |         # Step 1: Mock families response
1509 |         mock_ecs.list_task_definition_families = mock.MagicMock(
1510 |             return_value={"families": ["test-app"]}
1511 |         )
1512 | 
1513 |         # Step 2: Mock empty task definitions response
1514 |         mock_ecs.list_task_definitions.return_value = {"taskDefinitionArns": []}
1515 | 
1516 |         # Call the function
1517 |         result = await _get_task_definitions_by_family_prefix("test-app", mock_ecs)
1518 | 
1519 |         # Assert empty result
1520 |         assert result == []
1521 | 
1522 |         # Verify correct API calls
1523 |         mock_ecs.list_task_definition_families.assert_called_once_with(
1524 |             familyPrefix="test-app", status="ACTIVE"
1525 |         )
1526 |         mock_ecs.list_task_definitions.assert_called_once_with(
1527 |             familyPrefix="test-app", status="ACTIVE", sort="DESC", maxResults=1
1528 |         )
1529 |         mock_ecs.describe_task_definition.assert_not_called()
1530 | 
1531 |     @pytest.mark.anyio
1532 |     async def test_get_task_definitions_by_family_prefix_client_error_list_families(
1533 |         self, mock_aws_clients
1534 |     ):
1535 |         """Test ClientError when listing families."""
1536 |         mock_ecs = mock_aws_clients["ecs"]
1537 | 
1538 |         # Mock ClientError for list_task_definition_families
1539 |         error_response = {"Error": {"Code": "ClientException", "Message": "Error listing families"}}
1540 |         mock_ecs.list_task_definition_families = mock.MagicMock(
1541 |             side_effect=ClientError(error_response, "ListTaskDefinitionFamilies")
1542 |         )
1543 | 
1544 |         # Call the function
1545 |         result = await _get_task_definitions_by_family_prefix("test-app", mock_ecs)
1546 | 
1547 |         # Assert empty result
1548 |         assert result == []
1549 | 
1550 |         # Verify API calls
1551 |         mock_ecs.list_task_definition_families.assert_called_once_with(
1552 |             familyPrefix="test-app", status="ACTIVE"
1553 |         )
1554 |         mock_ecs.list_task_definitions.assert_not_called()
1555 |         mock_ecs.describe_task_definition.assert_not_called()
1556 | 
1557 |     @pytest.mark.anyio
1558 |     async def test_get_task_definitions_by_family_prefix_client_error_list_task_definitions(
1559 |         self, mock_aws_clients
1560 |     ):
1561 |         """Test ClientError when listing task definitions."""
1562 |         mock_ecs = mock_aws_clients["ecs"]
1563 | 
1564 |         # Step 1: Mock families response
1565 |         mock_ecs.list_task_definition_families = mock.MagicMock(
1566 |             return_value={"families": ["test-app"]}
1567 |         )
1568 | 
1569 |         # Step 2: Mock ClientError for list_task_definitions
1570 |         error_response = {
1571 |             "Error": {"Code": "ClientException", "Message": "Error listing task definitions"}
1572 |         }
1573 |         mock_ecs.list_task_definitions = mock.MagicMock(
1574 |             side_effect=ClientError(error_response, "ListTaskDefinitions")
1575 |         )
1576 | 
1577 |         # Call the function
1578 |         result = await _get_task_definitions_by_family_prefix("test-app", mock_ecs)
1579 | 
1580 |         # Assert empty result
1581 |         assert result == []
1582 | 
1583 |         # Verify API calls
1584 |         mock_ecs.list_task_definition_families.assert_called_once_with(
1585 |             familyPrefix="test-app", status="ACTIVE"
1586 |         )
1587 |         mock_ecs.list_task_definitions.assert_called_once_with(
1588 |             familyPrefix="test-app", status="ACTIVE", sort="DESC", maxResults=1
1589 |         )
1590 |         mock_ecs.describe_task_definition.assert_not_called()
1591 | 
1592 |     @pytest.mark.anyio
1593 |     async def test_get_task_definitions_by_family_prefix_client_error_describe_task_definition(
1594 |         self, mock_aws_clients
1595 |     ):
1596 |         """Test ClientError when describing task definition."""
1597 |         mock_ecs = mock_aws_clients["ecs"]
1598 | 
1599 |         # Step 1: Mock families response
1600 |         mock_ecs.list_task_definition_families = mock.MagicMock(
1601 |             return_value={"families": ["test-app"]}
1602 |         )
1603 | 
1604 |         # Step 2: Mock list_task_definitions response
1605 |         mock_ecs.list_task_definitions = mock.MagicMock(
1606 |             return_value={
1607 |                 "taskDefinitionArns": [
1608 |                     "arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1609 |                 ]
1610 |             }
1611 |         )
1612 | 
1613 |         # Step 3: Mock ClientError for describe_task_definition
1614 |         error_response = {
1615 |             "Error": {"Code": "ClientException", "Message": "Task definition not found"}
1616 |         }
1617 |         mock_ecs.describe_task_definition = mock.MagicMock(
1618 |             side_effect=ClientError(error_response, "DescribeTaskDefinition")
1619 |         )
1620 | 
1621 |         # Call the function
1622 |         result = await _get_task_definitions_by_family_prefix("test-app", mock_ecs)
1623 | 
1624 |         # Assert empty result
1625 |         assert result == []
1626 | 
1627 |         # Verify API calls
1628 |         mock_ecs.list_task_definition_families.assert_called_once_with(
1629 |             familyPrefix="test-app", status="ACTIVE"
1630 |         )
1631 |         mock_ecs.list_task_definitions.assert_called_once_with(
1632 |             familyPrefix="test-app", status="ACTIVE", sort="DESC", maxResults=1
1633 |         )
1634 |         mock_ecs.describe_task_definition.assert_called_once_with(
1635 |             taskDefinition="arn:aws:ecs:us-west-2:123456789012:task-definition/test-app:1"
1636 |         )
1637 | 
1638 |     @pytest.mark.anyio
1639 |     async def test_get_task_definitions_by_family_prefix_general_exception(self, mock_aws_clients):
1640 |         """Test general exception handling."""
1641 |         mock_ecs = mock_aws_clients["ecs"]
1642 | 
1643 |         # Configure general exception
1644 |         mock_ecs.list_task_definition_families = mock.MagicMock(
1645 |             side_effect=Exception("Test exception")
1646 |         )
1647 | 
1648 |         # Call the function
1649 |         result = await _get_task_definitions_by_family_prefix("test-app", mock_ecs)
1650 | 
1651 |         # Assert empty result
1652 |         assert result == []
1653 | 
1654 |         # Verify API calls
1655 |         mock_ecs.list_task_definition_families.assert_called_once_with(
1656 |             familyPrefix="test-app", status="ACTIVE"
1657 |         )
1658 |         mock_ecs.list_task_definitions.assert_not_called()
1659 |         mock_ecs.describe_task_definition.assert_not_called()
1660 | 
```
Page 537/560FirstPrevNextLast