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

# Files

--------------------------------------------------------------------------------
/src/cloudwatch-appsignals-mcp-server/tests/test_canary_utils.py:
--------------------------------------------------------------------------------

```python
   1 | """Tests for canary_utils functions."""
   2 | 
   3 | import gzip
   4 | import json
   5 | import pytest
   6 | from awslabs.cloudwatch_appsignals_mcp_server.canary_utils import (
   7 |     _matches_bucket_pattern,
   8 |     analyze_canary_logs_with_time_window,
   9 |     analyze_har_file,
  10 |     analyze_iam_role_and_policies,
  11 |     analyze_log_files,
  12 |     analyze_screenshots,
  13 |     check_iam_exists_for_canary,
  14 |     check_lambda_permissions,
  15 |     check_resource_arns_correct,
  16 |     extract_disk_memory_usage_metrics,
  17 |     get_canary_code,
  18 |     get_canary_metrics_and_service_insights,
  19 | )
  20 | from botocore.exceptions import ClientError
  21 | from datetime import datetime, timezone
  22 | from unittest.mock import AsyncMock, MagicMock, patch
  23 | 
  24 | 
  25 | @pytest.fixture
  26 | def mock_canary_clients():
  27 |     """Mock AWS clients for testing."""
  28 |     return {
  29 |         'iam_client': MagicMock(),
  30 |         's3_client': MagicMock(),
  31 |         'synthetics_client': MagicMock(),
  32 |         'logs_client': MagicMock(),
  33 |         'lambda_client': MagicMock(),
  34 |     }
  35 | 
  36 | 
  37 | @pytest.mark.asyncio
  38 | @pytest.mark.parametrize(
  39 |     'canary_config,expected_exists',
  40 |     [
  41 |         ({}, False),
  42 |         ({'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}, True),
  43 |     ],
  44 | )
  45 | async def test_check_iam_exists_for_canary(mock_canary_clients, canary_config, expected_exists):
  46 |     """Test check iam exists for canary."""
  47 |     mock_iam = mock_canary_clients['iam_client']
  48 | 
  49 |     if expected_exists:
  50 |         mock_iam.get_role.return_value = {'Role': {'RoleName': 'TestRole'}}
  51 |     else:
  52 |         mock_iam.get_role.side_effect = ClientError({'Error': {'Code': 'NoSuchEntity'}}, 'GetRole')
  53 | 
  54 |     result = await check_iam_exists_for_canary(canary_config, mock_iam)
  55 | 
  56 |     assert result['exists'] == expected_exists
  57 |     if not expected_exists and canary_config:
  58 |         assert 'does not exist' in result['error']
  59 |     elif not canary_config:
  60 |         assert 'No execution role configured' in result['error']
  61 | 
  62 | 
  63 | @pytest.mark.asyncio
  64 | @pytest.mark.parametrize(
  65 |     'policies,expected_basic,expected_vpc',
  66 |     [
  67 |         ([], False, False),
  68 |         (
  69 |             [{'PolicyArn': 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'}],
  70 |             True,
  71 |             False,
  72 |         ),
  73 |         (
  74 |             [
  75 |                 {
  76 |                     'PolicyArn': 'arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole'
  77 |                 }
  78 |             ],
  79 |             True,
  80 |             True,
  81 |         ),
  82 |     ],
  83 | )
  84 | async def test_check_lambda_permissions(
  85 |     mock_canary_clients, policies, expected_basic, expected_vpc
  86 | ):
  87 |     """Test check lambda permissions."""
  88 |     mock_iam = mock_canary_clients['iam_client']
  89 |     mock_iam.list_attached_role_policies.return_value = {'AttachedPolicies': policies}
  90 | 
  91 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
  92 |     result = await check_lambda_permissions(canary, mock_iam)
  93 | 
  94 |     assert result['has_basic_execution'] == expected_basic
  95 |     assert result['has_vpc_permissions'] == expected_vpc
  96 | 
  97 | 
  98 | @pytest.mark.asyncio
  99 | async def test_analyze_iam_role_and_policies_comprehensive(mock_canary_clients):
 100 |     """Test analyze iam role and policies comprehensive."""
 101 |     mock_iam = mock_canary_clients['iam_client']
 102 | 
 103 |     with (
 104 |         patch(
 105 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_iam_exists_for_canary'
 106 |         ) as mock_iam_check,
 107 |         patch(
 108 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_lambda_permissions'
 109 |         ) as mock_lambda_check,
 110 |     ):
 111 |         mock_iam_check.return_value = {'exists': True, 'role_name': 'TestRole'}
 112 |         mock_lambda_check.return_value = {
 113 |             'has_basic_execution': True,
 114 |             'has_managed_basic_execution': True,
 115 |             'has_vpc_permissions': False,
 116 |             'needs_vpc_check': True,
 117 |         }
 118 | 
 119 |         canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
 120 |         result = await analyze_iam_role_and_policies(canary, mock_iam, 'us-east-1')
 121 | 
 122 |         assert result['status'] == 'completed'
 123 |         assert '✅ IAM role `TestRole` exists' in result['checks']['iam_exists']
 124 |         assert '✅ Has Lambda basic execution permissions' in result['checks']['lambda_execution']
 125 | 
 126 | 
 127 | @pytest.mark.parametrize(
 128 |     's3_location,expected_correct',
 129 |     [
 130 |         ('', False),  # No S3 location
 131 |         ('s3://cw-syn-results-123456789012-us-east-1/', True),  # Standard bucket
 132 |         ('s3://custom-bucket/', True),  # Custom bucket
 133 |     ],
 134 | )
 135 | def test_check_resource_arns_correct(mock_canary_clients, s3_location, expected_correct):
 136 |     """Test check resource arns correct."""
 137 |     mock_iam = mock_canary_clients['iam_client']
 138 |     mock_iam.list_attached_role_policies.return_value = {'AttachedPolicies': []}
 139 | 
 140 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
 141 |     if s3_location:
 142 |         canary['ArtifactS3Location'] = s3_location
 143 | 
 144 |     result = check_resource_arns_correct(canary, mock_iam)
 145 | 
 146 |     if not s3_location:
 147 |         assert result['correct'] is False
 148 |         assert 'No S3 artifact location configured' in result['error']
 149 |     else:
 150 |         assert 'correct' in result
 151 | 
 152 | 
 153 | @pytest.mark.parametrize(
 154 |     'actual_bucket,pattern,expected',
 155 |     [
 156 |         ('cw-syn-results-123456789012-us-east-1', 'cw-syn-results-123456789012-us-east-1', True),
 157 |         ('cw-syn-results-123456789012-us-east-1', 'cw-syn-results-*-us-east-1', True),
 158 |         ('wrong-bucket', 'cw-syn-results-*-us-east-1', False),
 159 |     ],
 160 | )
 161 | def test_matches_bucket_pattern(actual_bucket, pattern, expected):
 162 |     """Test matches bucket pattern."""
 163 |     assert _matches_bucket_pattern(actual_bucket, pattern) == expected
 164 | 
 165 | 
 166 | @pytest.mark.asyncio
 167 | @pytest.mark.parametrize(
 168 |     'har_files,har_content,expected_status',
 169 |     [
 170 |         ([], None, 'no_har_files'),  # No HAR files
 171 |         ([{'Key': 'test.har'}], '{"log":{"entries":[]}}', 'empty_har'),  # Empty HAR
 172 |         ([{'Key': 'test.har'}], 'invalid json', 'error'),  # Invalid JSON
 173 |         (
 174 |             [{'Key': 'test.har'}],
 175 |             '{"log":{"entries":[{"request":{"url":"https://example.com"},"response":{"status":200},"timings":{"wait":100}}]}}',
 176 |             'analyzed',
 177 |         ),  # Valid HAR
 178 |     ],
 179 | )
 180 | async def test_analyze_har_file(mock_canary_clients, har_files, har_content, expected_status):
 181 |     """Test analyze har file."""
 182 |     mock_s3 = mock_canary_clients['s3_client']
 183 | 
 184 |     if har_content:
 185 |         mock_s3.get_object.return_value = {
 186 |             'Body': MagicMock(read=lambda: har_content.encode('utf-8'))
 187 |         }
 188 | 
 189 |     result = await analyze_har_file(mock_s3, 'bucket', har_files, True)
 190 |     assert result['status'] == expected_status
 191 | 
 192 | 
 193 | @pytest.mark.asyncio
 194 | async def test_analyze_har_file_with_failures_and_timing(mock_canary_clients):
 195 |     """Test analyze har file with failures and timing."""
 196 |     mock_s3 = mock_canary_clients['s3_client']
 197 |     har_data = {
 198 |         'log': {
 199 |             'entries': [
 200 |                 {
 201 |                     'request': {'url': 'https://example.com/api'},
 202 |                     'response': {'status': 500, 'statusText': 'Internal Server Error'},
 203 |                     'timings': {'blocked': 600, 'wait': 1200, 'receive': 50},
 204 |                 }
 205 |             ]
 206 |         }
 207 |     }
 208 |     mock_s3.get_object.return_value = {
 209 |         'Body': MagicMock(read=lambda: json.dumps(har_data).encode('utf-8'))
 210 |     }
 211 | 
 212 |     result = await analyze_har_file(mock_s3, 'bucket', [{'Key': 'test.har'}], True)
 213 | 
 214 |     assert result['status'] == 'analyzed'
 215 |     assert result['failed_requests'] == 1
 216 |     assert 'slowest requests' in ' '.join(result['insights'])
 217 | 
 218 | 
 219 | @pytest.mark.asyncio
 220 | @pytest.mark.parametrize(
 221 |     'screenshots,expected_status',
 222 |     [
 223 |         ([], 'no_screenshots'),  # No screenshots
 224 |         ([{'Key': 'step1-error-screenshot.png'}], 'analyzed'),  # Error screenshot
 225 |         ([{'Key': 'step1-timeout-screenshot.png'}], 'analyzed'),  # Timeout screenshot
 226 |     ],
 227 | )
 228 | async def test_analyze_screenshots(mock_canary_clients, screenshots, expected_status):
 229 |     """Test analyze screenshots."""
 230 |     result = await analyze_screenshots(
 231 |         mock_canary_clients['s3_client'], 'bucket', screenshots, True
 232 |     )
 233 |     assert result['status'] == expected_status
 234 | 
 235 | 
 236 | @pytest.mark.asyncio
 237 | @pytest.mark.parametrize(
 238 |     'logs,log_content,expected_patterns',
 239 |     [
 240 |         ([], None, 0),  # No logs
 241 |         ([{'Key': 'test.log'}], 'INFO: Test completed', 0),  # No errors
 242 |         (
 243 |             [{'Key': 'test.log'}],
 244 |             'ERROR: Navigation timeout\nERROR: Element not found',
 245 |             2,
 246 |         ),  # Multiple errors
 247 |     ],
 248 | )
 249 | async def test_analyze_log_files(mock_canary_clients, logs, log_content, expected_patterns):
 250 |     """Test analyze log files."""
 251 |     mock_s3 = mock_canary_clients['s3_client']
 252 | 
 253 |     if log_content:
 254 |         mock_s3.get_object.return_value = {
 255 |             'Body': MagicMock(read=lambda: log_content.encode('utf-8'))
 256 |         }
 257 | 
 258 |     result = await analyze_log_files(mock_s3, 'bucket', logs, True)
 259 | 
 260 |     if logs:
 261 |         assert result['status'] == 'analyzed'
 262 |         if expected_patterns > 0:
 263 |             assert result['error_patterns_found'] == expected_patterns
 264 |     else:
 265 |         assert result['status'] == 'no_logs'
 266 | 
 267 | 
 268 | @pytest.mark.asyncio
 269 | async def test_extract_disk_memory_usage_metrics():
 270 |     """Test extract disk memory usage metrics."""
 271 |     with (
 272 |         patch(
 273 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.synthetics_client'
 274 |         ) as mock_synthetics,
 275 |         patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs,
 276 |     ):
 277 |         mock_synthetics.get_canary.return_value = {'Canary': {'Name': 'test-canary'}}
 278 |         result = await extract_disk_memory_usage_metrics('test-canary', 'us-east-1')
 279 |         assert 'error' in result
 280 | 
 281 |         mock_synthetics.get_canary.return_value = {
 282 |             'Canary': {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
 283 |         }
 284 |         mock_logs.start_query.return_value = {'queryId': 'test-query'}
 285 |         mock_logs.get_query_results.return_value = {
 286 |             'status': 'Complete',
 287 |             'results': [
 288 |                 [
 289 |                     {'value': '2024-01-01T12:00:00Z'},
 290 |                     {'value': '100.5'},
 291 |                     {'value': '25.0'},
 292 |                     {'value': '512.0'},
 293 |                 ]
 294 |             ],
 295 |         }
 296 | 
 297 |         result = await extract_disk_memory_usage_metrics('test-canary', 'us-east-1')
 298 |         assert 'maxSyntheticsMemoryUsageInMB' in result
 299 | 
 300 | 
 301 | @pytest.mark.asyncio
 302 | async def test_analyze_canary_logs_with_time_window():
 303 |     """Test analyze canary logs with time window."""
 304 |     with patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs:
 305 |         canary = {'Name': 'test-canary'}
 306 |         failure_time = datetime(2024, 1, 1, 12, 0, 0, tzinfo=timezone.utc)
 307 |         result = await analyze_canary_logs_with_time_window(
 308 |             'test-canary', failure_time, canary, 5, 'us-east-1'
 309 |         )
 310 |         assert result['status'] == 'error'
 311 | 
 312 |         canary = {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
 313 |         mock_logs.filter_log_events.return_value = {
 314 |             'events': [{'timestamp': 1704110400000, 'message': 'ERROR: Test error message'}]
 315 |         }
 316 | 
 317 |         result = await analyze_canary_logs_with_time_window(
 318 |             'test-canary', failure_time, canary, 5, 'us-east-1'
 319 |         )
 320 |         assert result['status'] == 'success'
 321 |         assert len(result['error_events']) > 0
 322 | 
 323 | 
 324 | @pytest.mark.asyncio
 325 | async def test_get_canary_code():
 326 |     """Test get canary code."""
 327 |     with patch(
 328 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
 329 |     ) as mock_lambda:
 330 |         canary = {'Code': {'SourceLocationArn': 'arn:aws:s3:::test-bucket/code.zip'}}
 331 |         result = await get_canary_code(canary, 'us-east-1')
 332 |         assert 'error' in result
 333 | 
 334 |         canary = {
 335 |             'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test',
 336 |             'Code': {'Handler': 'index.handler'},
 337 |         }
 338 |         mock_lambda.get_function.return_value = {
 339 |             'Configuration': {
 340 |                 'MemorySize': 128,
 341 |                 'Timeout': 30,
 342 |                 'EphemeralStorage': {'Size': 512},
 343 |                 'Layers': [],
 344 |             },
 345 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
 346 |         }
 347 | 
 348 |         result = await get_canary_code(canary, 'us-east-1')
 349 |         assert 'function_name' in result
 350 |         assert result['memory_size'] == 128
 351 | 
 352 | 
 353 | @pytest.mark.asyncio
 354 | async def test_get_canary_metrics_and_service_insights():
 355 |     """Test get canary metrics and service insights."""
 356 |     with patch(
 357 |         'awslabs.cloudwatch_appsignals_mcp_server.audit_utils.execute_audit_api'
 358 |     ) as mock_audit:
 359 |         mock_audit.return_value = 'Mock audit results'
 360 |         result = await get_canary_metrics_and_service_insights('test-canary', 'us-east-1')
 361 |         assert isinstance(result, str)
 362 | 
 363 |         mock_audit.side_effect = Exception('API unavailable')
 364 |         result = await get_canary_metrics_and_service_insights('test-canary', 'us-east-1')
 365 |         assert 'ListAuditFindings API unavailable' in result
 366 | 
 367 | 
 368 | @pytest.mark.asyncio
 369 | async def test_analyze_canary_failures_integration():
 370 |     """Test analyze canary failures integration."""
 371 |     with (
 372 |         patch(
 373 |             'awslabs.cloudwatch_appsignals_mcp_server.aws_clients.synthetics_client'
 374 |         ) as mock_synthetics,
 375 |         patch('awslabs.cloudwatch_appsignals_mcp_server.aws_clients.iam_client'),
 376 |         patch('awslabs.cloudwatch_appsignals_mcp_server.aws_clients.s3_client') as mock_s3,
 377 |         patch('awslabs.cloudwatch_appsignals_mcp_server.aws_clients.sts_client') as mock_sts,
 378 |         patch('subprocess.run') as mock_subprocess,
 379 |     ):
 380 |         from awslabs.cloudwatch_appsignals_mcp_server.server import analyze_canary_failures
 381 | 
 382 |         mock_synthetics.get_canary_runs.return_value = {
 383 |             'CanaryRuns': [
 384 |                 {
 385 |                     'Id': 'run-failed-1',
 386 |                     'Status': {'State': 'FAILED', 'StateReason': 'Navigation timeout'},
 387 |                     'Timeline': {'Started': datetime(2024, 1, 1, 12, 0, 0, tzinfo=timezone.utc)},
 388 |                 }
 389 |             ]
 390 |         }
 391 | 
 392 |         mock_synthetics.get_canary.return_value = {
 393 |             'Canary': {
 394 |                 'Name': 'test-canary',
 395 |                 'ArtifactS3Location': 's3://test-bucket/artifacts/',
 396 |                 'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole',
 397 |             }
 398 |         }
 399 | 
 400 |         mock_sts.get_caller_identity.return_value = {'Arn': 'arn:aws:iam::123456789012:user/test'}
 401 |         mock_s3.list_objects_v2.return_value = {'Contents': []}
 402 |         mock_subprocess.return_value = MagicMock(returncode=0, stdout='Analysis complete')
 403 | 
 404 |         result = await analyze_canary_failures('test-canary', 'us-east-1')
 405 | 
 406 |         assert (
 407 |             'Error in comprehensive failure analysis' in result
 408 |             or '🔍 Comprehensive Failure Analysis for test-canary' in result
 409 |         )
 410 | 
 411 | 
 412 | @pytest.mark.asyncio
 413 | async def test_check_lambda_permissions_custom_policies():
 414 |     """Test check lambda permissions custom policies."""
 415 |     mock_iam = MagicMock()
 416 |     mock_iam.list_attached_role_policies.return_value = {
 417 |         'AttachedPolicies': [{'PolicyArn': 'arn:aws:iam::123456789012:policy/CustomPolicy'}]
 418 |     }
 419 | 
 420 |     mock_iam.get_policy.return_value = {'Policy': {'DefaultVersionId': 'v1'}}
 421 |     mock_iam.get_policy_version.return_value = {
 422 |         'PolicyVersion': {
 423 |             'Document': {
 424 |                 'Statement': [
 425 |                     {
 426 |                         'Effect': 'Allow',
 427 |                         'Action': [
 428 |                             'logs:CreateLogGroup',
 429 |                             'logs:CreateLogStream',
 430 |                             'logs:PutLogEvents',
 431 |                         ],
 432 |                     }
 433 |                 ]
 434 |             }
 435 |         }
 436 |     }
 437 | 
 438 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
 439 |     result = await check_lambda_permissions(canary, mock_iam)
 440 | 
 441 |     assert result['has_basic_execution'] is True
 442 |     assert 'CustomPolicy' in result['attached_policies'][0]
 443 | 
 444 | 
 445 | @pytest.mark.asyncio
 446 | async def test_check_lambda_permissions_policy_errors():
 447 |     """Test check lambda permissions policy errors."""
 448 |     mock_iam = MagicMock()
 449 |     mock_iam.list_attached_role_policies.return_value = {
 450 |         'AttachedPolicies': [{'PolicyArn': 'arn:aws:iam::123456789012:policy/CustomPolicy'}]
 451 |     }
 452 | 
 453 |     mock_iam.get_policy.side_effect = Exception('Policy parsing failed')
 454 | 
 455 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
 456 |     result = await check_lambda_permissions(canary, mock_iam)
 457 | 
 458 |     assert result['has_basic_execution'] is False
 459 | 
 460 | 
 461 | @pytest.mark.asyncio
 462 | async def test_analyze_har_file_html_complete_json():
 463 |     """Test analyze har file html with complete JSON that requires brace counting."""
 464 |     mock_s3 = MagicMock()
 465 | 
 466 |     # HTML content that will trigger the brace counting logic
 467 |     # Key: file must end with .har.html to trigger HTML parsing path
 468 |     html_content = 'var harOutput = {"log":{"entries":[]}};'
 469 | 
 470 |     mock_s3.get_object.return_value = {
 471 |         'Body': MagicMock(read=MagicMock(return_value=html_content.encode('utf-8')))
 472 |     }
 473 | 
 474 |     # Use .har.html extension to trigger the HTML parsing path with brace counting
 475 |     result = await analyze_har_file(mock_s3, 'bucket', [{'Key': 'test.har.html'}], True)
 476 | 
 477 |     # This covers lines 216-220: brace counting logic where brace_count == 0 and json_end > 0
 478 |     assert result['status'] == 'empty_har'  # Empty entries array
 479 | 
 480 | 
 481 | @pytest.mark.asyncio
 482 | async def test_analyze_har_file_html_incomplete_json():
 483 |     """Test analyze har file html incomplete json."""
 484 |     mock_s3 = MagicMock()
 485 | 
 486 |     html_content = 'var harOutput = {"log":{"entries":[{"request":{"url":"https://example.com"}'
 487 |     mock_s3.get_object.return_value = {
 488 |         'Body': MagicMock(read=lambda: html_content.encode('utf-8'))
 489 |     }
 490 | 
 491 |     result = await analyze_har_file(mock_s3, 'bucket', [{'Key': 'test.har.html'}], True)
 492 |     assert result['status'] == 'error'
 493 |     assert 'Could not find end of HAR JSON data' in result['insights'][0]
 494 | 
 495 | 
 496 | @pytest.mark.asyncio
 497 | async def test_analyze_har_file_timing_breakdown():
 498 |     """Test analyze har file timing breakdown."""
 499 |     mock_s3 = MagicMock()
 500 |     har_data = {
 501 |         'log': {
 502 |             'entries': [
 503 |                 {
 504 |                     'request': {'url': 'https://slow-example.com/api'},
 505 |                     'response': {'status': 200},
 506 |                     'timings': {
 507 |                         'blocked': 600,
 508 |                         'dns': 50,
 509 |                         'connect': 100,
 510 |                         'ssl': 200,
 511 |                         'send': 10,
 512 |                         'wait': 1200,
 513 |                         'receive': 40,
 514 |                     },
 515 |                 }
 516 |             ]
 517 |         }
 518 |     }
 519 |     mock_s3.get_object.return_value = {
 520 |         'Body': MagicMock(read=lambda: json.dumps(har_data).encode('utf-8'))
 521 |     }
 522 | 
 523 |     result = await analyze_har_file(mock_s3, 'bucket', [{'Key': 'test.har'}], True)
 524 | 
 525 |     assert result['status'] == 'analyzed'
 526 |     insights_text = ' '.join(result['insights'])
 527 |     assert 'requests with high blocking time' in insights_text
 528 |     assert 'requests with high server wait time' in insights_text
 529 | 
 530 | 
 531 | @pytest.mark.asyncio
 532 | async def test_check_resource_arns_correct_policy_errors():
 533 |     """Test check resource arns correct policy errors."""
 534 |     mock_iam = MagicMock()
 535 |     mock_iam.list_attached_role_policies.return_value = {
 536 |         'AttachedPolicies': [{'PolicyArn': 'arn:aws:iam::123456789012:policy/CustomPolicy'}]
 537 |     }
 538 | 
 539 |     mock_iam.get_policy.side_effect = ClientError({'Error': {'Code': 'NoSuchEntity'}}, 'GetPolicy')
 540 | 
 541 |     canary = {
 542 |         'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole',
 543 |         'ArtifactS3Location': 's3://test-bucket/',
 544 |     }
 545 |     result = check_resource_arns_correct(canary, mock_iam)
 546 | 
 547 |     assert result['correct'] is False
 548 | 
 549 | 
 550 | @pytest.mark.asyncio
 551 | async def test_check_resource_arns_correct_s3_mismatch():
 552 |     """Test check resource arns correct s3 mismatch."""
 553 |     mock_iam = MagicMock()
 554 |     mock_iam.list_attached_role_policies.return_value = {
 555 |         'AttachedPolicies': [{'PolicyArn': 'arn:aws:iam::123456789012:policy/CustomPolicy'}]
 556 |     }
 557 | 
 558 |     mock_iam.get_policy.return_value = {'Policy': {'DefaultVersionId': 'v1'}}
 559 |     mock_iam.get_policy_version.return_value = {
 560 |         'PolicyVersion': {
 561 |             'Document': {
 562 |                 'Statement': [{'Effect': 'Allow', 'Resource': 'arn:aws:s3:::wrong-bucket/*'}]
 563 |             }
 564 |         }
 565 |     }
 566 | 
 567 |     canary = {
 568 |         'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole',
 569 |         'ArtifactS3Location': 's3://correct-bucket/',
 570 |     }
 571 |     result = check_resource_arns_correct(canary, mock_iam)
 572 | 
 573 |     assert result['correct'] is False
 574 | 
 575 | 
 576 | @pytest.mark.asyncio
 577 | async def test_analyze_canary_logs_no_engine_arn():
 578 |     """Test analyze canary logs no engine arn."""
 579 |     canary = {'Name': 'test-canary'}
 580 |     failure_time = datetime(2024, 1, 1, 12, 0, 0, tzinfo=timezone.utc)
 581 | 
 582 |     result = await analyze_canary_logs_with_time_window(
 583 |         'test-canary', failure_time, canary, 5, 'us-east-1'
 584 |     )
 585 |     assert result['status'] == 'error'
 586 | 
 587 | 
 588 | @pytest.mark.asyncio
 589 | async def test_analyze_canary_logs_resource_not_found():
 590 |     """Test analyze canary logs resource not found."""
 591 |     with patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs:
 592 |         mock_logs.filter_log_events.side_effect = ClientError(
 593 |             {'Error': {'Code': 'ResourceNotFoundException'}}, 'FilterLogEvents'
 594 |         )
 595 | 
 596 |         canary = {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
 597 |         failure_time = datetime(2024, 1, 1, 12, 0, 0, tzinfo=timezone.utc)
 598 | 
 599 |         result = await analyze_canary_logs_with_time_window(
 600 |             'test-canary', failure_time, canary, 5, 'us-east-1'
 601 |         )
 602 |         assert result['status'] == 'no_logs'
 603 | 
 604 | 
 605 | @pytest.mark.asyncio
 606 | async def test_extract_disk_memory_usage_no_engine_configs():
 607 |     """Test extract disk memory usage no engine configs."""
 608 |     with patch(
 609 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.synthetics_client'
 610 |     ) as mock_synthetics:
 611 |         mock_synthetics.get_canary.return_value = {'Canary': {'Name': 'test-canary'}}
 612 | 
 613 |         result = await extract_disk_memory_usage_metrics('test-canary', 'us-east-1')
 614 |         assert 'error' in result
 615 |         assert 'No EngineArn or EngineConfigs found' in result['error']
 616 | 
 617 | 
 618 | @pytest.mark.asyncio
 619 | async def test_extract_disk_memory_usage_with_engine_configs():
 620 |     """Test extract disk memory usage with engine configs."""
 621 |     with (
 622 |         patch(
 623 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.synthetics_client'
 624 |         ) as mock_synthetics,
 625 |         patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs,
 626 |     ):
 627 |         mock_synthetics.get_canary.return_value = {
 628 |             'Canary': {
 629 |                 'EngineConfigs': [
 630 |                     {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
 631 |                 ]
 632 |             }
 633 |         }
 634 |         mock_logs.start_query.return_value = {'queryId': 'test-query'}
 635 |         mock_logs.get_query_results.return_value = {'status': 'Complete', 'results': []}
 636 | 
 637 |         result = await extract_disk_memory_usage_metrics('test-canary', 'us-east-1')
 638 |         assert 'error' in result
 639 |         assert 'No telemetry data found' in result['error']
 640 | 
 641 | 
 642 | @pytest.mark.asyncio
 643 | async def test_get_canary_code_with_engine_configs():
 644 |     """Test get canary code with engine configs."""
 645 |     with patch(
 646 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
 647 |     ) as mock_lambda:
 648 |         mock_lambda.get_function.return_value = {
 649 |             'Configuration': {
 650 |                 'MemorySize': 128,
 651 |                 'Timeout': 30,
 652 |                 'EphemeralStorage': {'Size': 512},
 653 |                 'Layers': [],
 654 |             },
 655 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
 656 |         }
 657 | 
 658 |         canary = {
 659 |             'EngineConfigs': [
 660 |                 {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
 661 |             ],
 662 |             'Code': {'Handler': 'index.handler'},
 663 |         }
 664 | 
 665 |         result = await get_canary_code(canary, 'us-east-1')
 666 |         assert 'function_name' in result
 667 |         assert result['memory_size'] == 128
 668 | 
 669 | 
 670 | @pytest.mark.asyncio
 671 | async def test_check_iam_exists_access_denied():
 672 |     """Test check iam exists access denied."""
 673 |     mock_iam = MagicMock()
 674 |     mock_iam.get_role.side_effect = ClientError(
 675 |         {'Error': {'Code': 'AccessDenied', 'Message': 'Access denied'}}, 'GetRole'
 676 |     )
 677 | 
 678 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
 679 |     result = await check_iam_exists_for_canary(canary, mock_iam)
 680 | 
 681 |     assert result['exists'] is False
 682 |     assert 'Cannot check role' in result['error']
 683 |     assert 'Access denied' in result['error']
 684 | 
 685 | 
 686 | @pytest.mark.asyncio
 687 | async def test_check_lambda_permissions_no_role():
 688 |     """Test check lambda permissions no role."""
 689 |     mock_iam = MagicMock()
 690 | 
 691 |     canary = {}
 692 |     result = await check_lambda_permissions(canary, mock_iam)
 693 | 
 694 |     assert result['has_basic_execution'] is False
 695 |     assert result['has_vpc_permissions'] is False
 696 |     assert result['needs_vpc_check'] is False
 697 |     assert 'No execution role configured' in result['error']
 698 | 
 699 | 
 700 | @pytest.mark.asyncio
 701 | async def test_analyze_log_files_gzipped_content():
 702 |     """Test analyze log files gzipped content."""
 703 |     mock_s3 = MagicMock()
 704 | 
 705 |     log_content = 'ERROR: Navigation timeout\nINFO: Test completed'
 706 |     gzipped_content = gzip.compress(log_content.encode('utf-8'))
 707 | 
 708 |     mock_s3.get_object.return_value = {
 709 |         'Body': MagicMock(read=lambda: gzipped_content),
 710 |         'ContentEncoding': 'gzip',
 711 |     }
 712 | 
 713 |     result = await analyze_log_files(mock_s3, 'bucket', [{'Key': 'test.log.gz'}], True)
 714 | 
 715 |     assert result['status'] == 'analyzed'
 716 |     assert result['error_patterns_found'] == 1
 717 | 
 718 | 
 719 | @pytest.mark.asyncio
 720 | async def test_analyze_har_file_gzipped_content():
 721 |     """Test analyze har file gzipped content."""
 722 |     mock_s3 = MagicMock()
 723 | 
 724 |     har_data = {'log': {'entries': []}}
 725 |     gzipped_content = gzip.compress(json.dumps(har_data).encode('utf-8'))
 726 | 
 727 |     mock_s3.get_object.return_value = {
 728 |         'Body': MagicMock(read=lambda: gzipped_content),
 729 |         'ContentEncoding': 'gzip',
 730 |     }
 731 | 
 732 |     result = await analyze_har_file(mock_s3, 'bucket', [{'Key': 'test.har.gz'}], True)
 733 | 
 734 |     assert result['status'] == 'empty_har'
 735 | 
 736 | 
 737 | @pytest.mark.asyncio
 738 | async def test_extract_disk_memory_usage_query_timeout():
 739 |     """Test extract disk memory usage query timeout."""
 740 |     with (
 741 |         patch(
 742 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.synthetics_client'
 743 |         ) as mock_synthetics,
 744 |         patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs,
 745 |     ):
 746 |         mock_synthetics.get_canary.return_value = {
 747 |             'Canary': {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
 748 |         }
 749 |         mock_logs.start_query.return_value = {'queryId': 'test-query'}
 750 | 
 751 |         mock_logs.get_query_results.return_value = {'status': 'Complete', 'results': []}
 752 | 
 753 |         result = await extract_disk_memory_usage_metrics('test-canary', 'us-east-1')
 754 |         assert 'error' in result
 755 |         assert 'No telemetry data found in canary logs' in result['error']
 756 | 
 757 | 
 758 | @pytest.mark.asyncio
 759 | async def test_get_canary_code_with_layers():
 760 |     """Test get canary code with layers."""
 761 |     with patch(
 762 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
 763 |     ) as mock_lambda:
 764 |         mock_lambda.get_function.return_value = {
 765 |             'Configuration': {
 766 |                 'MemorySize': 256,
 767 |                 'Timeout': 60,
 768 |                 'EphemeralStorage': {'Size': 1024},
 769 |                 'Layers': [
 770 |                     {'Arn': 'arn:aws:lambda:us-east-1:123456789012:layer:test-layer:1'},
 771 |                     {'Arn': 'arn:aws:lambda:us-east-1:123456789012:layer:another-layer:2'},
 772 |                 ],
 773 |             },
 774 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
 775 |         }
 776 | 
 777 |         canary = {
 778 |             'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test',
 779 |             'Code': {'Handler': 'index.handler'},
 780 |         }
 781 | 
 782 |         result = await get_canary_code(canary, 'us-east-1')
 783 | 
 784 |         assert result['memory_size'] == 256
 785 |         assert result['timeout'] == 60
 786 |         assert result['layers_count'] == 2
 787 |         assert 'function_name' in result
 788 | 
 789 | 
 790 | @pytest.mark.asyncio
 791 | async def test_analyze_iam_role_missing_execution():
 792 |     """Test analyze iam role missing execution."""
 793 |     mock_iam = MagicMock()
 794 | 
 795 |     with (
 796 |         patch(
 797 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_iam_exists_for_canary'
 798 |         ) as mock_iam_check,
 799 |         patch(
 800 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_lambda_permissions'
 801 |         ) as mock_lambda_check,
 802 |     ):
 803 |         mock_iam_check.return_value = {'exists': True, 'role_name': 'TestRole'}
 804 |         mock_lambda_check.return_value = {
 805 |             'has_basic_execution': False,
 806 |             'has_managed_basic_execution': False,
 807 |             'has_vpc_permissions': False,
 808 |             'needs_vpc_check': True,
 809 |         }
 810 | 
 811 |         canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
 812 |         result = await analyze_iam_role_and_policies(canary, mock_iam, 'us-east-1')
 813 | 
 814 |         assert result['status'] == 'completed'
 815 |         assert (
 816 |             '❌ Missing Lambda basic execution permissions' in result['checks']['lambda_execution']
 817 |         )
 818 |         assert 'IAM role lacks Lambda execution permissions' in result['issues_found']
 819 | 
 820 | 
 821 | @pytest.mark.asyncio
 822 | async def test_analyze_iam_role_custom_execution():
 823 |     """Test analyze iam role custom execution."""
 824 |     mock_iam = MagicMock()
 825 | 
 826 |     with (
 827 |         patch(
 828 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_iam_exists_for_canary'
 829 |         ) as mock_iam_check,
 830 |         patch(
 831 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_lambda_permissions'
 832 |         ) as mock_lambda_check,
 833 |     ):
 834 |         mock_iam_check.return_value = {'exists': True, 'role_name': 'TestRole'}
 835 |         mock_lambda_check.return_value = {
 836 |             'has_basic_execution': True,
 837 |             'has_managed_basic_execution': False,
 838 |             'has_vpc_permissions': False,
 839 |             'needs_vpc_check': True,
 840 |         }
 841 | 
 842 |         canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
 843 |         result = await analyze_iam_role_and_policies(canary, mock_iam, 'us-east-1')
 844 | 
 845 |         assert result['status'] == 'completed'
 846 |         assert (
 847 |             '✅ Has custom Lambda execution permissions (sufficient)'
 848 |             in result['checks']['lambda_execution']
 849 |         )
 850 | 
 851 | 
 852 | @pytest.mark.asyncio
 853 | async def test_analyze_iam_role_with_error():
 854 |     """Test analyze iam role with error."""
 855 |     mock_iam = MagicMock()
 856 | 
 857 |     with (
 858 |         patch(
 859 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_iam_exists_for_canary'
 860 |         ) as mock_iam_check,
 861 |         patch(
 862 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_lambda_permissions'
 863 |         ) as mock_lambda_check,
 864 |     ):
 865 |         mock_iam_check.return_value = {'exists': True, 'role_name': 'TestRole'}
 866 |         mock_lambda_check.return_value = {'error': 'Permission denied'}
 867 | 
 868 |         canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
 869 |         result = await analyze_iam_role_and_policies(canary, mock_iam, 'us-east-1')
 870 | 
 871 |         assert result['status'] == 'completed'
 872 |         assert (
 873 |             '❌ IAM role check failed: Permission denied' in result['checks']['lambda_execution']
 874 |         )
 875 |         assert 'Cannot verify IAM permissions: Permission denied' in result['issues_found']
 876 | 
 877 | 
 878 | @pytest.mark.asyncio
 879 | async def test_analyze_har_file_html_no_var():
 880 |     """Test analyze har file html no var."""
 881 |     mock_s3 = MagicMock()
 882 | 
 883 |     html_content = '<html><body>No harOutput variable here</body></html>'
 884 |     mock_s3.get_object.return_value = {
 885 |         'Body': MagicMock(read=lambda: html_content.encode('utf-8'))
 886 |     }
 887 | 
 888 |     result = await analyze_har_file(mock_s3, 'bucket', [{'Key': 'test.har.html'}], True)
 889 |     assert result['status'] == 'error'
 890 |     assert 'Could not find harOutput variable in HTML' in result['insights'][0]
 891 | 
 892 | 
 893 | @pytest.mark.asyncio
 894 | async def test_analyze_log_files_read_error():
 895 |     """Test analyze log files read error."""
 896 |     mock_s3 = MagicMock()
 897 |     mock_s3.get_object.side_effect = Exception('S3 read failed')
 898 | 
 899 |     result = await analyze_log_files(mock_s3, 'bucket', [{'Key': 'test.log'}], True)
 900 | 
 901 |     assert result['status'] == 'analyzed'
 902 |     assert any('Could not read log' in insight for insight in result['insights'])
 903 | 
 904 | 
 905 | @pytest.mark.asyncio
 906 | async def test_check_resource_arns_correct_with_s3_prefix():
 907 |     """Test check resource arns correct with s3 prefix."""
 908 |     mock_iam = MagicMock()
 909 |     mock_iam.list_attached_role_policies.return_value = {'AttachedPolicies': []}
 910 | 
 911 |     canary = {
 912 |         'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole',
 913 |         'ArtifactS3Location': 'test-bucket/prefix/',
 914 |     }
 915 |     result = check_resource_arns_correct(canary, mock_iam)
 916 | 
 917 |     assert 'correct' in result
 918 |     assert result['actual_bucket'] == 'test-bucket'
 919 | 
 920 | 
 921 | @pytest.mark.asyncio
 922 | async def test_get_canary_code_source_location_arn():
 923 |     """Test get canary code source location arn."""
 924 |     with (
 925 |         patch(
 926 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
 927 |         ) as mock_lambda,
 928 |         patch('requests.get') as mock_requests,
 929 |         patch('tempfile.NamedTemporaryFile') as mock_temp,
 930 |         patch('zipfile.ZipFile') as mock_zip,
 931 |         patch('os.unlink'),
 932 |     ):
 933 |         mock_lambda.get_function.return_value = {
 934 |             'Configuration': {
 935 |                 'MemorySize': 128,
 936 |                 'Timeout': 30,
 937 |                 'EphemeralStorage': {'Size': 512},
 938 |                 'Layers': [],
 939 |             },
 940 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
 941 |         }
 942 | 
 943 |         mock_lambda.get_layer_version_by_arn.return_value = {
 944 |             'Content': {'Location': 'https://s3.amazonaws.com/layer.zip'}
 945 |         }
 946 | 
 947 |         mock_zip_instance = MagicMock()
 948 |         mock_zip.return_value.__enter__.return_value = mock_zip_instance
 949 |         mock_zip_instance.namelist.return_value = ['nodejs/node_modules/index.js']
 950 |         mock_zip_instance.open.return_value.__enter__.return_value.read.return_value = (
 951 |             b'console.log("test");'
 952 |         )
 953 | 
 954 |         mock_temp.return_value.__enter__.return_value.name = '/tmp/test.zip'
 955 |         mock_requests.return_value.content = b'zip content'
 956 | 
 957 |         canary = {
 958 |             'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test',
 959 |             'Code': {
 960 |                 'SourceLocationArn': 'arn:aws:lambda:us-east-1:123456789012:layer:test:1',
 961 |                 'Handler': 'index.handler',
 962 |             },
 963 |         }
 964 | 
 965 |         result = await get_canary_code(canary, 'us-east-1')
 966 |         assert 'function_name' in result
 967 | 
 968 | 
 969 | @pytest.mark.asyncio
 970 | async def test_get_canary_code_custom_layers():
 971 |     """Test get canary code custom layers."""
 972 |     with (
 973 |         patch(
 974 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
 975 |         ) as mock_lambda,
 976 |         patch('requests.get') as mock_requests,
 977 |         patch('tempfile.NamedTemporaryFile') as mock_temp,
 978 |         patch('zipfile.ZipFile') as mock_zip,
 979 |         patch('os.unlink'),
 980 |     ):
 981 |         mock_lambda.get_function.return_value = {
 982 |             'Configuration': {
 983 |                 'MemorySize': 128,
 984 |                 'Timeout': 30,
 985 |                 'EphemeralStorage': {'Size': 512},
 986 |                 'Layers': [{'Arn': 'arn:aws:lambda:us-east-1:123456789012:layer:custom:1'}],
 987 |             },
 988 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
 989 |         }
 990 | 
 991 |         mock_lambda.get_layer_version_by_arn.return_value = {
 992 |             'Content': {'Location': 'https://s3.amazonaws.com/layer.zip'}
 993 |         }
 994 | 
 995 |         mock_zip_instance = MagicMock()
 996 |         mock_zip.return_value.__enter__.return_value = mock_zip_instance
 997 |         mock_zip_instance.namelist.return_value = ['index.js']
 998 |         mock_zip_instance.open.return_value.__enter__.return_value.read.return_value = (
 999 |             b'console.log("custom layer");'
1000 |         )
1001 | 
1002 |         mock_temp.return_value.__enter__.return_value.name = '/tmp/test.zip'
1003 |         mock_requests.return_value.content = b'zip content'
1004 | 
1005 |         canary = {
1006 |             'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test',
1007 |             'Code': {'Handler': 'index.handler'},
1008 |         }
1009 | 
1010 |         result = await get_canary_code(canary, 'us-east-1')
1011 |         assert 'function_name' in result
1012 |         assert 'code_content' in result
1013 | 
1014 | 
1015 | @pytest.mark.asyncio
1016 | async def test_get_canary_code_function_code_fallback():
1017 |     """Test get canary code function code fallback."""
1018 |     with (
1019 |         patch(
1020 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
1021 |         ) as mock_lambda,
1022 |         patch('requests.get') as mock_requests,
1023 |         patch('tempfile.NamedTemporaryFile') as mock_temp,
1024 |         patch('zipfile.ZipFile') as mock_zip,
1025 |         patch('os.unlink'),
1026 |     ):
1027 |         mock_lambda.get_function.return_value = {
1028 |             'Configuration': {
1029 |                 'MemorySize': 128,
1030 |                 'Timeout': 30,
1031 |                 'EphemeralStorage': {'Size': 512},
1032 |                 'Layers': [],
1033 |             },
1034 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
1035 |         }
1036 | 
1037 |         mock_zip_instance = MagicMock()
1038 |         mock_zip.return_value.__enter__.return_value = mock_zip_instance
1039 |         mock_zip_instance.namelist.return_value = ['index.js']
1040 |         mock_zip_instance.open.return_value.__enter__.return_value.read.return_value = (
1041 |             b'exports.handler = async () => {};'
1042 |         )
1043 | 
1044 |         mock_temp.return_value.__enter__.return_value.name = '/tmp/test.zip'
1045 |         mock_requests.return_value.content = b'zip content'
1046 | 
1047 |         canary = {
1048 |             'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test',
1049 |             'Code': {'Handler': 'index.handler'},
1050 |         }
1051 | 
1052 |         result = await get_canary_code(canary, 'us-east-1')
1053 |         assert 'function_name' in result
1054 |         assert 'code_content' in result
1055 | 
1056 | 
1057 | @pytest.mark.asyncio
1058 | async def test_get_canary_code_extraction_error():
1059 |     """Test get canary code extraction error."""
1060 |     with patch(
1061 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
1062 |     ) as mock_lambda:
1063 |         mock_lambda.get_function.return_value = {
1064 |             'Configuration': {
1065 |                 'MemorySize': 128,
1066 |                 'Timeout': 30,
1067 |                 'EphemeralStorage': {'Size': 512},
1068 |                 'Layers': [],
1069 |             },
1070 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
1071 |         }
1072 | 
1073 |         with patch('requests.get', side_effect=Exception('Download failed')):
1074 |             canary = {
1075 |                 'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test',
1076 |                 'Code': {'Handler': 'index.handler'},
1077 |             }
1078 | 
1079 |             result = await get_canary_code(canary, 'us-east-1')
1080 |             assert 'function_name' in result
1081 |             assert 'Could not extract function code' in result['code_content']
1082 | 
1083 | 
1084 | @pytest.mark.asyncio
1085 | async def test_extract_disk_memory_usage_invalid_results():
1086 |     """Test extract disk memory usage invalid results."""
1087 |     with (
1088 |         patch(
1089 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.synthetics_client'
1090 |         ) as mock_synthetics,
1091 |         patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs,
1092 |     ):
1093 |         mock_synthetics.get_canary.return_value = {
1094 |             'Canary': {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
1095 |         }
1096 |         mock_logs.start_query.return_value = {'queryId': 'test-query'}
1097 | 
1098 |         mock_logs.get_query_results.return_value = {
1099 |             'status': 'Complete',
1100 |             'results': [[{'value': '2024-01-01T12:00:00Z'}]],
1101 |         }
1102 | 
1103 |         result = await extract_disk_memory_usage_metrics('test-canary', 'us-east-1')
1104 |         assert 'error' in result
1105 |         assert 'No valid telemetry metrics found' in result['error']
1106 | 
1107 | 
1108 | @pytest.mark.asyncio
1109 | async def test_coverage_check_lambda_permissions_string_actions():
1110 |     """Test coverage check lambda permissions string actions."""
1111 |     mock_iam = MagicMock()
1112 |     mock_iam.list_attached_role_policies.return_value = {
1113 |         'AttachedPolicies': [{'PolicyArn': 'arn:aws:iam::123456789012:policy/CustomPolicy'}]
1114 |     }
1115 | 
1116 |     mock_iam.get_policy.return_value = {'Policy': {'DefaultVersionId': 'v1'}}
1117 |     mock_iam.get_policy_version.return_value = {
1118 |         'PolicyVersion': {
1119 |             'Document': {'Statement': [{'Effect': 'Allow', 'Action': 'logs:CreateLogGroup'}]}
1120 |         }
1121 |     }
1122 | 
1123 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
1124 |     result = await check_lambda_permissions(canary, mock_iam)
1125 | 
1126 |     assert result['has_basic_execution'] is True
1127 | 
1128 | 
1129 | @pytest.mark.asyncio
1130 | async def test_coverage_check_resource_arns_policy_exception():
1131 |     """Test coverage check resource arns policy exception."""
1132 |     mock_iam = MagicMock()
1133 |     mock_iam.list_attached_role_policies.return_value = {
1134 |         'AttachedPolicies': [{'PolicyArn': 'arn:aws:iam::123456789012:policy/CustomPolicy'}]
1135 |     }
1136 | 
1137 |     mock_iam.get_policy.side_effect = Exception('General error')
1138 | 
1139 |     canary = {
1140 |         'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole',
1141 |         'ArtifactS3Location': 's3://test-bucket/',
1142 |     }
1143 |     result = check_resource_arns_correct(canary, mock_iam)
1144 | 
1145 |     assert 'correct' in result
1146 | 
1147 | 
1148 | @pytest.mark.asyncio
1149 | async def test_coverage_check_resource_arns_string_resources():
1150 |     """Test coverage check resource arns string resources."""
1151 |     mock_iam = MagicMock()
1152 |     mock_iam.list_attached_role_policies.return_value = {
1153 |         'AttachedPolicies': [{'PolicyArn': 'arn:aws:iam::123456789012:policy/CustomPolicy'}]
1154 |     }
1155 | 
1156 |     mock_iam.get_policy.return_value = {'Policy': {'DefaultVersionId': 'v1'}}
1157 |     mock_iam.get_policy_version.return_value = {
1158 |         'PolicyVersion': {
1159 |             'Document': {
1160 |                 'Statement': [{'Effect': 'Allow', 'Resource': 'arn:aws:s3:::test-bucket/*'}]
1161 |             }
1162 |         }
1163 |     }
1164 | 
1165 |     canary = {
1166 |         'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole',
1167 |         'ArtifactS3Location': 's3://test-bucket/',
1168 |     }
1169 |     result = check_resource_arns_correct(canary, mock_iam)
1170 | 
1171 |     assert result['correct'] is True
1172 | 
1173 | 
1174 | @pytest.mark.asyncio
1175 | async def test_coverage_analyze_canary_logs_string_failure_time():
1176 |     """Test coverage analyze canary logs string failure time."""
1177 |     with patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs:
1178 |         mock_logs.filter_log_events.return_value = {'events': []}
1179 | 
1180 |         canary = {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
1181 |         failure_time = '2024-01-01T12:00:00Z'
1182 | 
1183 |         result = await analyze_canary_logs_with_time_window(
1184 |             'test-canary', failure_time, canary, 5, 'us-east-1'
1185 |         )
1186 |         assert result['status'] == 'success'
1187 | 
1188 | 
1189 | @pytest.mark.asyncio
1190 | async def test_coverage_analyze_canary_logs_other_client_error():
1191 |     """Test coverage analyze canary logs other client error."""
1192 |     with patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs:
1193 |         mock_logs.filter_log_events.side_effect = ClientError(
1194 |             {'Error': {'Code': 'AccessDenied', 'Message': 'Access denied'}}, 'FilterLogEvents'
1195 |         )
1196 | 
1197 |         canary = {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
1198 |         failure_time = datetime(2024, 1, 1, 12, 0, 0, tzinfo=timezone.utc)
1199 | 
1200 |         result = await analyze_canary_logs_with_time_window(
1201 |             'test-canary', failure_time, canary, 5, 'us-east-1'
1202 |         )
1203 |         assert result['status'] == 'error'
1204 |         assert 'CloudWatch logs access error' in result['insights'][0]
1205 | 
1206 | 
1207 | @pytest.mark.asyncio
1208 | async def test_coverage_extract_disk_memory_usage_query_running():
1209 |     """Test coverage extract disk memory usage query running."""
1210 |     with (
1211 |         patch(
1212 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.synthetics_client'
1213 |         ) as mock_synthetics,
1214 |         patch('awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client') as mock_logs,
1215 |         patch('asyncio.sleep', new_callable=AsyncMock),
1216 |     ):
1217 |         mock_synthetics.get_canary.return_value = {
1218 |             'Canary': {'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test'}
1219 |         }
1220 |         mock_logs.start_query.return_value = {'queryId': 'test-query'}
1221 | 
1222 |         mock_logs.get_query_results.return_value = {'status': 'Running'}
1223 | 
1224 |         result = await extract_disk_memory_usage_metrics('test-canary', 'us-east-1')
1225 |         assert 'error' in result
1226 | 
1227 | 
1228 | @pytest.mark.asyncio
1229 | async def test_coverage_get_canary_code_layer_exception():
1230 |     """Test coverage get canary code layer exception."""
1231 |     with patch(
1232 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
1233 |     ) as mock_lambda:
1234 |         mock_lambda.get_function.return_value = {
1235 |             'Configuration': {
1236 |                 'MemorySize': 128,
1237 |                 'Timeout': 30,
1238 |                 'EphemeralStorage': {'Size': 512},
1239 |                 'Layers': [{'Arn': 'arn:aws:lambda:us-east-1:123456789012:layer:custom:1'}],
1240 |             },
1241 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
1242 |         }
1243 | 
1244 |         mock_lambda.get_layer_version_by_arn.side_effect = Exception('Layer processing failed')
1245 | 
1246 |         canary = {
1247 |             'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test',
1248 |             'Code': {'Handler': 'index.handler'},
1249 |         }
1250 | 
1251 |         result = await get_canary_code(canary, 'us-east-1')
1252 |         assert 'function_name' in result
1253 | 
1254 | 
1255 | @pytest.mark.asyncio
1256 | async def test_coverage_get_canary_code_source_location_exception():
1257 |     """Test coverage get canary code source location exception."""
1258 |     with patch(
1259 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.lambda_client'
1260 |     ) as mock_lambda:
1261 |         mock_lambda.get_function.return_value = {
1262 |             'Configuration': {
1263 |                 'MemorySize': 128,
1264 |                 'Timeout': 30,
1265 |                 'EphemeralStorage': {'Size': 512},
1266 |                 'Layers': [],
1267 |             },
1268 |             'Code': {'Location': 'https://s3.amazonaws.com/bucket/code.zip'},
1269 |         }
1270 | 
1271 |         mock_lambda.get_layer_version_by_arn.side_effect = Exception('Source location failed')
1272 | 
1273 |         canary = {
1274 |             'EngineArn': 'arn:aws:lambda:us-east-1:123456789012:function:test',
1275 |             'Code': {
1276 |                 'SourceLocationArn': 'arn:aws:lambda:us-east-1:123456789012:layer:test:1',
1277 |                 'Handler': 'index.handler',
1278 |             },
1279 |         }
1280 | 
1281 |         result = await get_canary_code(canary, 'us-east-1')
1282 |         assert 'function_name' in result
1283 | 
1284 | 
1285 | @pytest.mark.asyncio
1286 | async def test_coverage_analyze_iam_role_no_exists():
1287 |     """Test coverage analyze iam role no exists."""
1288 |     mock_iam = MagicMock()
1289 | 
1290 |     with (
1291 |         patch(
1292 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_iam_exists_for_canary'
1293 |         ) as mock_iam_check,
1294 |         patch(
1295 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_lambda_permissions'
1296 |         ) as mock_lambda_check,
1297 |     ):
1298 |         mock_iam_check.return_value = {'exists': False, 'error': 'Role does not exist'}
1299 |         mock_lambda_check.return_value = {
1300 |             'has_basic_execution': True,
1301 |             'has_managed_basic_execution': True,
1302 |             'has_vpc_permissions': True,
1303 |             'needs_vpc_check': False,
1304 |         }
1305 | 
1306 |         canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
1307 |         result = await analyze_iam_role_and_policies(canary, mock_iam, 'us-east-1')
1308 | 
1309 |         assert result['status'] == 'completed'
1310 |         assert '❌ IAM role does not exist' in result['checks']['iam_exists']
1311 |         assert 'Role does not exist' in result['issues_found']
1312 | 
1313 | 
1314 | @pytest.mark.asyncio
1315 | async def test_coverage_analyze_iam_role_with_vpc():
1316 |     """Test coverage analyze iam role with vpc."""
1317 |     mock_iam = MagicMock()
1318 | 
1319 |     with (
1320 |         patch(
1321 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_iam_exists_for_canary'
1322 |         ) as mock_iam_check,
1323 |         patch(
1324 |             'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.check_lambda_permissions'
1325 |         ) as mock_lambda_check,
1326 |     ):
1327 |         mock_iam_check.return_value = {'exists': True, 'role_name': 'TestRole'}
1328 |         mock_lambda_check.return_value = {
1329 |             'has_basic_execution': True,
1330 |             'has_managed_basic_execution': True,
1331 |             'has_vpc_permissions': True,
1332 |             'needs_vpc_check': False,
1333 |         }
1334 | 
1335 |         canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/TestRole'}
1336 |         result = await analyze_iam_role_and_policies(canary, mock_iam, 'us-east-1')
1337 | 
1338 |         assert result['status'] == 'completed'
1339 |         assert '✅ Has Lambda VPC permissions' in result['checks']['lambda_vpc']
1340 | 
1341 | 
1342 | def test_check_resource_arns_correct_no_execution_role():
1343 |     """Test check_resource_arns_correct with no execution role."""
1344 |     canary = {}
1345 |     iam_client = MagicMock()
1346 | 
1347 |     result = check_resource_arns_correct(canary, iam_client)
1348 | 
1349 |     assert result['correct'] is False
1350 |     assert 'No execution role configured' in result['error']
1351 | 
1352 | 
1353 | def test_check_resource_arns_correct_iam_exception():
1354 |     """Test check_resource_arns_correct with IAM client exception."""
1355 |     canary = {
1356 |         'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/test-role',
1357 |         'ArtifactS3Location': 's3://test-bucket/path/',
1358 |     }
1359 |     iam_client = MagicMock()
1360 |     iam_client.list_attached_role_policies.side_effect = Exception('IAM error')
1361 | 
1362 |     result = check_resource_arns_correct(canary, iam_client)
1363 | 
1364 |     assert result['correct'] is False
1365 |     assert 'IAM error' in result['error']
1366 | 
1367 | 
1368 | @pytest.mark.asyncio
1369 | async def test_analyze_canary_logs_with_time_window_exception():
1370 |     """Test analyze_canary_logs_with_time_window with exception during processing."""
1371 |     with patch(
1372 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client'
1373 |     ) as mock_logs_client:
1374 |         mock_logs_client.describe_log_groups.side_effect = Exception('Logs error')
1375 | 
1376 |         result = await analyze_canary_logs_with_time_window(
1377 |             'test-canary', '2024-01-01T00:00:00Z', {}, 3
1378 |         )
1379 | 
1380 |         assert result['status'] == 'error'
1381 |         assert 'Log analysis failed:' in result['insights'][0]
1382 | 
1383 | 
1384 | @pytest.mark.asyncio
1385 | async def test_extract_disk_memory_usage_metrics_exception():
1386 |     """Test extract_disk_memory_usage_metrics with exception."""
1387 |     with patch(
1388 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.synthetics_client'
1389 |     ) as mock_synthetics_client:
1390 |         mock_synthetics_client.get_canary.side_effect = Exception('CloudWatch error')
1391 | 
1392 |         result = await extract_disk_memory_usage_metrics('test-canary')
1393 | 
1394 |         assert 'error' in result
1395 |         assert 'Resource analysis failed: CloudWatch error' in result['error']
1396 | 
1397 | 
1398 | @pytest.mark.asyncio
1399 | async def test_extract_disk_memory_usage_metrics_telemetry_exception():
1400 |     """Test extract_disk_memory_usage_metrics with telemetry processing exception."""
1401 |     with patch(
1402 |         'awslabs.cloudwatch_appsignals_mcp_server.canary_utils.logs_client'
1403 |     ) as mock_logs_client:
1404 |         # Mock successful log group check but fail during telemetry processing
1405 |         mock_logs_client.describe_log_groups.return_value = {
1406 |             'logGroups': [{'logGroupName': '/aws/synthetics/canary/test-canary'}]
1407 |         }
1408 |         mock_logs_client.start_query.return_value = {'queryId': 'test-query-id'}
1409 |         mock_logs_client.get_query_results.return_value = {
1410 |             'status': 'Complete',
1411 |             'results': [
1412 |                 [
1413 |                     {'field': '@timestamp', 'value': '2024-01-01T00:00:00Z'},
1414 |                     {'field': '@message', 'value': 'invalid json'},
1415 |                 ]
1416 |             ],
1417 |         }
1418 | 
1419 |         result = await extract_disk_memory_usage_metrics('test-canary')
1420 | 
1421 |         # Should handle JSON parsing errors gracefully
1422 |         assert 'error' in result
1423 |         assert 'Resource analysis failed:' in result['error']
1424 | 
1425 | 
1426 | @pytest.mark.asyncio
1427 | async def test_check_iam_exists_for_canary_no_such_entity():
1428 |     """Test check_iam_exists_for_canary with NoSuchEntity error."""
1429 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/nonexistent-role'}
1430 |     iam_client = MagicMock()
1431 | 
1432 |     error_response = {'Error': {'Code': 'NoSuchEntity', 'Message': 'Role does not exist'}}
1433 |     iam_client.get_role.side_effect = ClientError(error_response, 'GetRole')  # type: ignore
1434 | 
1435 |     result = await check_iam_exists_for_canary(canary, iam_client)
1436 | 
1437 |     assert result['exists'] is False
1438 |     assert "Role 'nonexistent-role' does not exist" in result['error']
1439 | 
1440 | 
1441 | @pytest.mark.asyncio
1442 | async def test_check_iam_exists_for_canary_other_client_error():
1443 |     """Test check_iam_exists_for_canary with other ClientError."""
1444 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/test-role'}
1445 |     iam_client = MagicMock()
1446 | 
1447 |     error_response = {'Error': {'Code': 'AccessDenied', 'Message': 'Access denied'}}
1448 |     iam_client.get_role.side_effect = ClientError(error_response, 'GetRole')  # type: ignore
1449 | 
1450 |     result = await check_iam_exists_for_canary(canary, iam_client)
1451 | 
1452 |     assert result['exists'] is False
1453 |     assert 'Cannot check role: Access denied' in result['error']
1454 | 
1455 | 
1456 | @pytest.mark.asyncio
1457 | async def test_check_lambda_permissions_exception():
1458 |     """Test check_lambda_permissions with exception."""
1459 |     canary = {'ExecutionRoleArn': 'arn:aws:iam::123456789012:role/test-role'}
1460 |     iam_client = MagicMock()
1461 |     iam_client.list_attached_role_policies.side_effect = Exception('IAM error')
1462 | 
1463 |     result = await check_lambda_permissions(canary, iam_client)
1464 | 
1465 |     assert result['has_basic_execution'] is False
1466 |     assert result['has_vpc_permissions'] is False
1467 |     assert result['needs_vpc_check'] is False
1468 |     assert 'IAM error' in result['error']
1469 | 
1470 | 
1471 | @pytest.mark.asyncio
1472 | async def test_get_canary_code_exception():
1473 |     """Test get_canary_code with general exception."""
1474 |     canary = {}  # Invalid canary to trigger exception
1475 | 
1476 |     result = await get_canary_code(canary)
1477 | 
1478 |     assert 'error' in result
1479 |     assert 'No EngineArn or EngineConfigs found for canary' in result['error']
1480 | 
```
Page 572/613FirstPrevNextLast