Skip to content

feat: support Ultra Fast Create for Aurora Postgres cluster (i.e. expression cluster)#2801

Merged
kennthhz merged 22 commits intoawslabs:mainfrom
kennthhz:sharu-dev-merge-main
Mar 31, 2026
Merged

feat: support Ultra Fast Create for Aurora Postgres cluster (i.e. expression cluster)#2801
kennthhz merged 22 commits intoawslabs:mainfrom
kennthhz:sharu-dev-merge-main

Conversation

@kennthhz
Copy link
Copy Markdown
Contributor

Fixes

Summary

Support Ultra Fast Create for Aurora Postgres cluster (i.e. expression cluster)

Changes

  1. Add new API support to create express cluster (UFC)
  2. Add E2E test case
  3. Improve psycopg connection pool

User experience

Support Ultra Fast Create for Aurora Postgres cluster

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • [ x] I have reviewed the contributing guidelines
  • [ x] I have performed a self-review of this change
  • [ x] Changes have been tested
  • [ x] Changes are documented

Is this a breaking change? (Y/N)

N

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 92.16867% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.35%. Comparing base (8ef8460) to head (09c75de).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ostgres_mcp_server/connection/cp_api_connection.py 91.52% 5 Missing and 5 partials ⚠️
...s_mcp_server/connection/psycopg_pool_connection.py 88.88% 2 Missing ⚠️
...s-mcp-server/awslabs/postgres_mcp_server/server.py 96.15% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2801    +/-   ##
========================================
  Coverage   91.35%   91.35%            
========================================
  Files        1011     1011            
  Lines       74361    74478   +117     
  Branches    11959    11979    +20     
========================================
+ Hits        67934    68041   +107     
- Misses       3973     3978     +5     
- Partials     2454     2459     +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kennthhz kennthhz changed the title Sharu dev merge main Support Ultra Fast Create for Aurora Postgres cluster (i.e. expression cluster) Mar 30, 2026
@kennthhz kennthhz changed the title Support Ultra Fast Create for Aurora Postgres cluster (i.e. expression cluster) feat: support Ultra Fast Create for Aurora Postgres cluster (i.e. expression cluster) Mar 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Ultra Fast Create (Aurora PostgreSQL “Express” clusters) support to the postgres MCP server, along with connection/pool robustness improvements and expanded test coverage around the new flows.

Changes:

  • Add express-cluster creation path (with_express_configuration=True) and related AWS control-plane helpers (create + delete).
  • Make connect_to_database async and eagerly initialize psycopg pools (with cleanup on pool init failure).
  • Add/extend unit tests and introduce an end-to-end integration test script for real cluster creation.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/postgres-mcp-server/uv.lock Updates locked AWS SDK dependency versions.
src/postgres-mcp-server/pyproject.toml Bumps boto3/botocore minimum versions.
src/postgres-mcp-server/awslabs/postgres_mcp_server/server.py Implements express cluster creation option; renames internal connection helper; makes connect tool async; adjusts error handling and pool init behavior.
src/postgres-mcp-server/awslabs/postgres_mcp_server/connection/cp_api_connection.py Adds express cluster create helper and cluster deletion helper; improves exception logging.
src/postgres-mcp-server/awslabs/postgres_mcp_server/connection/psycopg_pool_connection.py Hardens pool initialization and adds richer logging + expiry diagnostics.
src/postgres-mcp-server/awslabs/postgres_mcp_server/connection/rds_api_connection.py Improves transaction rollback logging and exception propagation style.
src/postgres-mcp-server/tests/test_server.py Updates tests for new behaviors and adds express create_cluster coverage.
src/postgres-mcp-server/tests/test_server_internal_functions.py Updates tests to new internal connection function name.
src/postgres-mcp-server/tests/test_server_error_handling.py Updates for async connect tool + adds pool init success/failure tests.
src/postgres-mcp-server/tests/test_psycopg_connector.py Adds test ensuring pool is cleared on open failure.
src/postgres-mcp-server/tests/test_cp_api_simple_functions.py Updates expected error message for instance lookup failure.
src/postgres-mcp-server/tests/test_cp_api_connection.py Adds tests for express cluster creation and cluster deletion.
src/postgres-mcp-server/tests/e2e_integration_test.py Adds a live AWS E2E integration script for express + serverless clusters and cleanup.
src/postgres-mcp-server/kiro_power/steering/aurora-postgres-mcp.md Documents when/how to use express vs regular clusters.
src/postgres-mcp-server/kiro_power/POWER.md Updates operational guidance for express vs regular clusters and connection methods.
Comments suppressed due to low confidence (1)

src/postgres-mcp-server/awslabs/postgres_mcp_server/server.py:573

  • Port is hard-coded to 5432 when creating the cached connection after serverless cluster creation. If the cluster port ever differs (or becomes configurable), this will cache a connection under the wrong port; use cluster_result['Port'] (or fetch from cluster properties) instead of a constant.
        internal_create_connection(
            region=region,
            database_type=database_type,
            connection_method=connection_method,
            cluster_identifier=cluster_identifier,
            db_endpoint=cluster_result['Endpoint'],
            port=5432,
            database=database,
        )

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

kennthhz and others added 2 commits March 31, 2026 11:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@MichaelWalker-git MichaelWalker-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kennthhz kennthhz added this pull request to the merge queue Mar 31, 2026
Merged via the queue into awslabs:main with commit d166bc8 Mar 31, 2026
147 checks passed
@kennthhz kennthhz deleted the sharu-dev-merge-main branch March 31, 2026 19:54
@github-project-automation github-project-automation bot moved this from To triage to Done in awslabs/mcp Project Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants