Overview
What's Included
- PostgreSQL 16, 17, or 18 (choose version)
- pgAdmin 4 web interface
- pgvector extension for AI/embeddings
- pgBouncer connection pooler
- pgBackRest for S3 backups with PITR
- SSL encryption enabled
- Separate EBS data volume
Step-by-Step Guide
1
Launch the AMI
Choose your PostgreSQL version from AWS Marketplace.
# Available versions:
# PostgreSQL 16 - Current stable
# PostgreSQL 17 - Latest features
# PostgreSQL 18 - Cutting edge (Enterprise edition)
# Enterprise editions include:
# - pgBackRest with PITR
# - pgBouncer connection pooling
# - Advanced monitoring
2
Access pgAdmin
Log into the web-based database management interface.
ssh -i your-key.pem ubuntu@your-instance-ip
sudo cat /opt/flowops/credentials.txt
# pgAdmin URL:
http://your-instance-ip/pgadmin4
# Login with admin email and password from credentials.txt
# Then add server connection to localhost:5432
3
Enable pgvector for AI
Set up vector similarity search for RAG applications.
-- Connect to your database
psql -U postgres
-- Enable pgvector
CREATE EXTENSION IF NOT EXISTS vector;
-- Create table with vector column (OpenAI dimensions)
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
content TEXT NOT NULL,
embedding vector(1536),
metadata JSONB,
created_at TIMESTAMP DEFAULT NOW()
);
-- Create HNSW index for fast search
CREATE INDEX ON documents
USING hnsw (embedding vector_cosine_ops)
WITH (m = 16, ef_construction = 64);
4
Query Vectors
Perform similarity search with SQL.
-- Insert a document with embedding
INSERT INTO documents (content, embedding, metadata) VALUES (
'PostgreSQL is powerful',
'[0.1, 0.2, ...]'::vector, -- Your 1536-dim embedding
'{"source": "docs"}'
);
-- Find 5 most similar documents
SELECT content, metadata,
1 - (embedding <=> '[0.1, 0.2, ...]'::vector) AS similarity
FROM documents
ORDER BY embedding <=> '[0.1, 0.2, ...]'::vector
LIMIT 5;
Comparison
| Feature | This AMI | RDS PostgreSQL | Aurora |
|---|---|---|---|
| pgvector | Included | Available | Available |
| pgAdmin | Included | Not available | Not available |
| pgBouncer | Enterprise | RDS Proxy ($) | Built-in |
| PITR Backups | Enterprise | Included | Included |
| Cost (db.m5.large) | ~$70/month | ~$140/month | ~$200/month |
Use Cases
- AI/ML applications with pgvector
- Geospatial applications (PostGIS)
- Time-series data (TimescaleDB compatible)
- Financial systems
- Healthcare applications
- Enterprise data warehousing
Pricing
Our AMIs are available on AWS Marketplace with simple hourly pricing:
- Software: $0.10-0.15/hour (varies by product)
- EC2: Standard AWS pricing for your chosen instance
- Support: 24/7 included with guaranteed 24-hour response
Need Help?
Our UK-based support team is here to help you get the most out of your deployment. Email us at support@flowopsconsulting.co.uk for any questions.
Comments