EDB Postgres AI Agent Factory is EDB Postgres Advanced Server 18 with the AIDB extension, Vector Plus and the AIDB MCP server, delivered as one CloudFormation stack that also creates an Amazon Bedrock AgentCore Gateway and registers the MCP server on it. Agents call the gateway; the gateway reaches the instance over a private VPC Lattice connection. No port is opened to the internet and no SSH key is used.
| Parameter | Value |
|---|---|
| AmiId | Filled by AWS Marketplace. Leave as is. |
| VpcId | A VPC with outbound access (NAT gateway, transit gateway or VPC endpoints) to Secrets Manager, Systems Manager and Bedrock AgentCore. |
| SubnetId | A subnet in that VPC. The instance and the gateway's private connection both land here. |
| InstanceType | m6i.large, m6i.xlarge (default) or m6i.2xlarge. The embeddings model runs on the CPU; 4 vCPU / 16 GiB or more is recommended. |
| GatewayName | Name for the AgentCore Gateway (default edb-aidb). Must be unique among AgentCore gateways in this account and region. |
| DataVolumeSize | Size in GiB of the EBS volume that holds the Postgres data (default 50). |
| ExistingDataVolumeId | Optional. The DataVolumeId output of a deleted stack, to start with that data. Leave empty for a new empty volume. The volume must be in the same Availability Zone as the subnet and not attached to any instance. |
mcp_agent Postgres role, publishes its CA certificate, and a Lambda-backed custom resource registers the MCP target on the gateway and waits for it to become READY.| Output | Use |
|---|---|
| GatewayUrl | The MCP endpoint your agent connects to. |
| GatewayId | AgentCore Gateway identifier. |
| DataVolumeId | The EBS volume that holds the Postgres data. It is kept when the stack is deleted. |
| InstanceId | For a shell: aws ssm start-session --target <InstanceId>. |
| McpEndpoint | The private MCP URL on the instance (https://<private-dns>:8765/mcp). Only the gateway can reach it. |
| CredentialsSecretArn | Secrets Manager secret with the generated login for the mcp_agent database role. Only the gateway and the instance role can read it. |
| CaCertificateSecretArn | Secrets Manager secret holding the instance's private CA certificate. |
The gateway uses IAM authorization (SigV4). Calls are signed with the IAM role the caller already runs under: the instance profile of the EC2 instance or the execution role of the Lambda function hosting your agent, or your own signed-in role when testing from a workstation. Grant that role bedrock-agentcore:InvokeGateway on the gateway ARN. Nothing is typed into the product.
The example below runs anywhere an IAM role is present (EC2 instance profile, Lambda execution role, ECS task role, or a signed-in AWS CLI session). The AWS SDK picks up that role on its own:
import json, boto3
from botocore.auth import SigV4Auth
from botocore.awsrequest import AWSRequest
import urllib.request
gateway_url = boto3.client("cloudformation").describe_stacks(StackName="<stack>")["Stacks"][0]["Outputs"]
gateway_url = next(o["OutputValue"] for o in gateway_url if o["OutputKey"] == "GatewayUrl")
body = json.dumps({"jsonrpc": "2.0", "id": 1, "method": "tools/list"})
req = AWSRequest(method="POST", url=gateway_url, data=body, headers={"Content-Type": "application/json"})
SigV4Auth(boto3.Session().get_credentials(), "bedrock-agentcore", "us-east-1").add_auth(req)
print(urllib.request.urlopen(urllib.request.Request(gateway_url, data=body.encode(), headers=dict(req.headers), method="POST")).read().decode())
From an agent framework, point the MCP client at GatewayUrl with SigV4 signing for service bedrock-agentcore; every major SDK signs with the same IAM role lookup. The AIDB tools (semantic_kb_search, SQL and schema tools) appear in the tool list. If you prefer JWT, add a Cognito or OIDC authorizer to the gateway after creation; the template creates it with AuthorizerType: AWS_IAM.
edb, extensions aidb, edb_vectorplus, edb_cloneschema and edb_job_scheduler (for dbms_job and dbms_scheduler); SPL and database links are built in. Local admin: sudo -iu enterprisedb psql -d edb over SSM.edbplus), JDBC, ODBC and OCL connectors, Language Pack (plperl, plpython3, pltcl), LDAP Sync. Database links to Oracle (edb_dblink_oci) need an Oracle Instant Client, which you install yourself.mcp_agent is created at first boot from the Secrets Manager secret the stack generates. The gateway presents it to the MCP server; nothing is baked into the AMI.semkb over schema public is created at build time with live auto processing. Tables you add to public are indexed as rows arrive; semantic_kb_search works from the first table.nomic-embed-text-v1.5 (GGUF, llama.cpp) is pre-downloaded in the image. No internet access is needed at runtime.None required. The template creates two security groups: the gateway connection group (no inbound) and the instance group, which accepts TCP 8765 only from the gateway connection group.
The Postgres data directory is on a separate EBS volume, encrypted with the AWS managed key. The volume is kept when the stack is deleted, and it keeps costing money until you delete it.
/etc/edb-as) come from the AMI and are not kept.Delete the stack. The custom resource removes the gateway target and its AgentCore Identity entry; the gateway, instance, secrets and IAM roles are deleted with the stack. The data volume stays. Delete it in the EC2 console (Volumes) when you no longer need the data.
Version 1.2. Listing: AWS Marketplace. Support: techsupport.enterprisedb.com.