The Simplest Way to Make ECS and Metabase Work Like They Should
Running ecs and metabase together lets your team host business charts in elastic containers. This setup scales your analytics app while keeping your database inside a private network. Many teams put the analytics container on AWS and point it at production data. That choice gets charts up fast, but it often creates big security gaps. A good setup separates app state from business data and restricts every query. How data and permissions flow between ecs and metabase The container service runs
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 ecs and metabase together lets your team host business charts in elastic containers. This setup scales your analytics app while keeping your database inside a private network.
Many teams put the analytics container on AWS and point it at production data. That choice gets charts up fast, but it often creates big security gaps. A good setup separates app state from business data and restricts every query.
How data and permissions flow between ecs and metabase
The container service runs the analytics app as one or more tasks. Each task needs two distinct database links to do its job well. The first link stores app state like saved questions, dashboards, and user groups. The second link reads your actual business data to build charts and tables.
Your container task starts up and reads startup keys from a secret store. Those keys tell the app how to find its internal state database. Once the app is running, an admin adds connections to your business data stores. When a user opens a dashboard, the container sends a query to the database. The database checks the role of the account and sends back the rows.
Network rules control how traffic moves between the container task and the database. Both systems should sit inside private subnets with strict security groups. Only the analytics task security group should reach the database port. External users reach the analytics web interface through a load balancer in a public subnet.
Common failure modes with shared accounts and broad access
The biggest risk in this setup is a single shared database account. Teams often create one database user for the analytics app with broad read rights. Every person who logs into the analytics tool then shares that same database power. If a user writes raw queries in the app, they can read any table.
Unlogged queries create another major blind spot for engineering and security teams. When the database sees a bad query, the log only shows the shared app user. You cannot tell which person on your team ran the slow or risky query. Audits fail because you cannot tie database reads back to a real human user.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Exposed private data in query results is a third common problem. Business tables often hold user emails, phone numbers, card numbers, or national IDs. A broad database role sends all of those raw fields straight into the chart tool. Any analyst who exports a table gets a file full of raw personal data.
How to scope roles and network paths in production
Start by creating a read-only database role with access to specific views or tables. Never give the analytics database user rights to write, drop, or alter any data. Grant select rights only on the clean tables that analysts need for their charts. Leave raw tables with passwords, keys, or private records out of that role.
Next, split your database connections by team or data sensitivity level. Create one database user for finance data and a separate user for product data. Map those separate connections to matching user groups inside the analytics app. This step keeps general staff from reading sensitive finance or human resources tables.
Finally, lock down task roles and secret access on the container side. Give the container task role rights to read only its own startup secrets. Set query timeouts on the database role so one bad chart cannot lock production. Rotate the database passwords on a regular schedule to limit the risk of leaked keys.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Where should the analytics app store its own internal state?
Store the app state in a dedicated relational database with automated daily backups. Never use the built-in file database in containers because tasks restart and wipe local files.
Should the analytics container connect to the primary production database?
No, point the analytics app at a read replica instead of your primary database. Heavy dashboard queries can slow down writes if they run on the main database.
How do we protect emails and card numbers in chart results?
Limit the database role to views that leave out sensitive columns when possible. You can also use data masking to rewrite emails and card numbers in query results.
Related guides
In this post