Skip to main content

EC2 Deployment

Deploy Cognee on Amazon EC2 for traditional cloud server deployments with full control over the infrastructure and custom configurations.
EC2 deployment is ideal for organizations that need direct server access, custom networking, or integration with existing AWS infrastructure.

Why EC2?

Full Control

Complete control over server configuration, networking, and security

AWS Integration

Native integration with AWS services like RDS, S3, and VPC

Cost Predictable

Fixed costs with reserved instances and predictable billing

Custom Networking

Advanced networking configurations and security groups

Prerequisites

1

AWS Account

  • Active AWS account with EC2 permissions
  • AWS CLI installed and configured
  • Key pair created for SSH access
2

Network Setup

  • VPC with public/private subnets
  • Security groups configured for HTTP/HTTPS traffic
  • Internet Gateway for public access
3

Domain & SSL

  • Domain name (optional but recommended)
  • SSL certificate (Let’s Encrypt or AWS Certificate Manager)

Instance Configuration

Small Scale Setup
  • Instance Type: t3.medium (2 vCPU, 4GB RAM)
  • Storage: 20GB GP3 SSD
  • OS: Ubuntu 22.04 LTS
  • Databases: Local SQLite, embedded vector DB

Quick Deployment

1

Launch EC2 Instance

Replace the AMI ID, security group, and subnet with your specific values.
2

Connect to Instance

3

Install Dependencies

4

Deploy Cognee

Manual Setup Process

Environment Setup

AWS Service Integration

RDS Integration

Managed PostgreSQL

S3 Storage

Object Storage

Security Configuration

1

Security Groups

2

SSL/TLS Setup

3

Firewall Configuration

Monitoring & Maintenance

Scaling & Performance

Troubleshooting

Service Won’t Start

Cost Optimization

Reserved Instances

Save up to 75%Purchase reserved instances for predictable workloads to reduce costs significantly.

Spot Instances

Development/TestingUse spot instances for non-critical workloads to save up to 90% on compute costs.
Use AWS Cost Explorer to monitor your EC2 spending and optimize instance types based on actual usage patterns.

Next Steps

High Availability

Multi-AZ SetupDeploy across multiple availability zones for improved resilience.

Monitoring Stack

CloudWatch IntegrationSet up comprehensive monitoring with CloudWatch and custom metrics.

Need Help?

Join our community for EC2 deployment support and AWS best practices.