feat: support Ultra Fast Create for Aurora Postgres cluster (i.e. expression cluster)#2801
Conversation
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
… connection to be inserted into connection map anyway
There was a problem hiding this comment.
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_databaseasync 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.
src/postgres-mcp-server/awslabs/postgres_mcp_server/connection/cp_api_connection.py
Outdated
Show resolved
Hide resolved
src/postgres-mcp-server/tests/test_server_internal_functions.py
Outdated
Show resolved
Hide resolved
src/postgres-mcp-server/kiro_power/steering/aurora-postgres-mcp.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…p.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fixes
Summary
Support Ultra Fast Create for Aurora Postgres cluster (i.e. expression cluster)
Changes
User experience
Support Ultra Fast Create for Aurora Postgres cluster
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? (Y/N)
N
RFC issue number:
Checklist:
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.