The Simplest Way to Make Ec2 Instances and Redash Work Like They Should
Running ec2 instances and redash together lets your team query live data and build charts. You host the app on cloud servers and link it to your data stores. This setup gives you full control over compute size, network rules, and storage. Your analysts can run SQL queries and share dashboards across the company. At the same time, your ops team keeps data inside your private cloud network. Getting the two tools to work well takes clear role and network planning. How data and roles flow between
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Running ec2 instances and redash together lets your team query live data and build charts. You host the app on cloud servers and link it to your data stores.
This setup gives you full control over compute size, network rules, and storage. Your analysts can run SQL queries and share dashboards across the company. At the same time, your ops team keeps data inside your private cloud network. Getting the two tools to work well takes clear role and network planning.
How data and roles flow between ec2 instances and redash
When you run Redash on an EC2 virtual server, two access layers matter. First, engineers need a safe way to log in to the host server. They do this to update the app, check worker queues, and read logs. Second, the app itself needs permission to read from your data sources.
You can attach an cloud IAM role to the host server. This role lets the server talk to cloud services without static keys on disk. For database queries, the app uses saved data source credentials to run SQL. Web users log in to the dashboard through your identity provider using single sign-on.
Background workers on the server pull jobs from a local queue. They send the query to the target database and wait for the results. Once the data comes back, the server stores the output and draws the chart. Good network rules keep all of this traffic inside your private subnets.
Common failure modes with shared accounts and network paths
Teams often take shortcuts when they first set up this stack. A common mistake is using one shared database account for every dashboard user. When someone runs a slow or broad query, database logs only show the shared account. You cannot tell which user wrote the query or why they ran it.
Another frequent issue is giving the shared database user write or admin rights. An analyst only needs to read data to build a chart. If that account has write access, a bad query can change or drop tables. Always scope the database role to read-only access on specific schemas.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Server access also brings risk if engineers share SSH keys on the host. Shared keys make it hard to track who changed a setting on the server. When an engineer leaves the team, rotating those shared keys takes manual work. You also want to avoid opening SSH ports to the public internet.
Scoping permissions and securing query workflows
Start by placing your app servers inside a private subnet. Use a load balancer in a public subnet to handle web traffic from users. Set up security groups so the database only accepts traffic from the app server. Block all public traffic from reaching your database ports or server admin ports.
Split your Redash data sources by team or data sensitivity. Create separate read-only database users for finance, product, and support teams. Map each data source to a matching user group inside the dashboard app. This stops a general user from querying restricted tables in another department.
Pay close attention to personal data in your query results. Analysts often query user tables that hold emails, phone numbers, or card numbers. If you do not mask these fields, raw data ends up in cached results. Data masking rewrites matched fields like national IDs in results before users export them.
Finally, keep a clear audit log of both server logins and database queries. Knowing who ran a command or query helps you fix issues fast and pass audits.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Should I use one database role for all Redash users?
No, you should create separate read-only database roles for different teams. This limits what tables each group can read and keeps your data safer.
How do I stop analysts from changing production data in Redash?
Grant only select permissions to the database user you add to the app. Never use the database admin account or an app write account for reporting.
Where should I place EC2 servers that run Redash?
Run the servers in a private subnet behind a load balancer. Allow network traffic only from the load balancer and toward your target databases.
Related guides
In this post