Skip to main content
Email [email protected] for access to this integration.
Connect AWS RDS PostgreSQL databases to Tembo for performance monitoring and optimization.

Features

  • Monitor slow queries - Identifies queries that exceed performance thresholds and suggests optimizations
  • Detect missing indexes - Analyzes query patterns to find opportunities for new indexes that would improve performance
  • Detect unused indexes - Identifies indexes that are no longer being used, helping reduce storage overhead and write performance impact
  • Automatic optimization PRs - Generates pull requests with database migration scripts to implement recommended improvements
  • Multi-region support - Automatically discovers RDS instances across multiple AWS regions

Installation

1

Connect AWS Account

Navigate to the Integrations page in Tembo and click the Connect button next to AWS. You’ll be redirected to AWS CloudFormation to create a connection using a secure IAM role.
2

Deploy CloudFormation Stack

Follow the CloudFormation wizard to deploy the connection stack. This creates an IAM role that allows Tembo to discover and monitor your RDS instances securely.
3

Activate RDS Instances

After the connection is established, Tembo will automatically discover your RDS PostgreSQL instances across supported regions. Select which instances you want to monitor under “Active Instances” on the Integrations page.
4

Map Repository

Map your RDS instances to the GitHub, GitLab, or Bitbucket repository where your database migrations are stored. This allows Tembo to create PRs with optimization suggestions.

Usage

Once connected, Tembo continuously monitors your RDS PostgreSQL instances for slow queries, missing indexes, and unused indexes using PostgreSQL’s pg_stat_statements extension. When optimization opportunities are identified, Tembo creates pull requests with database migration scripts, detailed explanations, and performance metrics.

Troubleshooting

RDS Instances Not Appearing

If your RDS instances don’t appear after connecting:
  1. Wait for discovery - Initial discovery can take a few minutes as Tembo scans multiple AWS regions
  2. Check CloudFormation stack - Verify the stack deployed successfully in your AWS console
  3. Verify IAM permissions - Ensure the IAM role has permission to describe RDS instances
  4. Check instance type - Only PostgreSQL RDS instances are supported

Optimization PRs Not Being Created

If Tembo isn’t creating optimization PRs:
  1. Verify repository mapping - Ensure your RDS instance is mapped to the correct repository
  2. Check pg_stat_statements - The extension must be enabled for query analysis
  3. Review monitoring period - Tembo needs time to collect query statistics before suggesting optimizations
  4. Check branch permissions - Ensure Tembo has permission to create branches in your repository

Connection Issues

If Tembo cannot connect to your RDS instance:
  1. Security groups - Verify the RDS security group allows connections from Tembo’s IP ranges
  2. VPC configuration - Ensure your RDS instance is accessible (public or via VPN/Direct Connect)
  3. SSL/TLS settings - Confirm SSL settings match your RDS configuration

Best Practices

  • Secure IAM Role - The CloudFormation template creates a least-privilege IAM role for Tembo
  • Monitor Production Databases - Connect production RDS instances for the most accurate performance insights
  • Review Migration Scripts - Always review Tembo’s suggested migrations before merging, especially for large tables
  • Test in Staging - Apply migrations to a staging environment first to verify performance improvements
  • Enable pg_stat_statements - Ensure the pg_stat_statements extension is enabled on your RDS instances for comprehensive query analysis