Aurora PostgreSQL Internal Tables vs S3 External Data: A Real-World Performance & Cost Benchmark

Aurora PostgreSQL supports reading data directly from Amazon S3 using aws_s3 functions, making it possible to offload heavy or cold data without fully moving it to a data lake platform. But does it perform well enough for analytical queries? In this benchmark, I tested identical datasets—one stored locally in Aurora tables, and the other offloaded to S3 and queried through external table definitions—to compare latency, resource impact, and practical usability.

Aurora PostgreSQL doesn’t provide a traditional federated query capability for S3 CSV files like some other database systems. Instead, you can:

  • Use External Tables via aws_s3 Functions
  • Create a View that dynamically loads S3 data
  • Use a Stored Procedure for ad-hoc S3 queries
  • And the list goes on…

I chose the first option because it offers several advantages:

Performance Control – You can optimize the function for your specific use case
Reusability – Create once, use multiple times with different parameters
Memory Management – Uses temporary tables that are automatically cleaned up
Flexibility – Easy to modify for different S3 files or filtering
Error Handling – Ability to implement proper error handling and logging
Cost Efficiency – Data is loaded only when actually needed

Setup PMM Server on EC2 for Aurora Monitoring – Part 2

Now when Percona PMM is installed and up – see Part 1 – lets add Aurora database to it. For this I created one small Aurora (PostgreSQL Compatible) database, engine 16.6, db.t3.medium.

Setup PMM Server on EC2 for Aurora Monitoring – Part 1

Percona Monitoring and Management (PMM) is an open-source tool for monitoring databases like PostgreSQL and MySQL, including Amazon Aurora. We will deploy PMM Server on an EC2 instance using Docker for a fast and simple setup. This allows us to collect and visualize performance metrics from Aurora in real time. The EC2 instance acts as a central monitoring hub without needing to install agents on the database itself.
Here are the step for PMM setup