Metabase AWS RDS IAM database authentication

Metabase can connect to RDS and Aurora PostgreSQL or MySQL with IAM authentication instead of a stored password, but only on Pro or Enterprise. This page covers the AWS, policy, database user and Metabase steps.

On this page

Why replace stored database passwords with Metabase AWS RDS IAM authentication

If your security or platform team runs self-hosted Metabase against Amazon RDS or Aurora PostgreSQL or MySQL and wants no long-lived database password on the Metabase server, IAM authentication is the option to evaluate. Metabase can connect to RDS PostgreSQL and MySQL and Aurora PostgreSQL or MySQL using AWS IAM authentication instead of a password, but this is a Pro and Enterprise feature, so open source and Starter deployments will keep using a stored password unless you move to a paid plan.

With IAM authentication, the password stored in Metabase's database connection settings is replaced by a short-lived authentication token that AWS issues to an IAM identity. The Metabase host or its attached role requests the token and presents it to the database, so the credential is governed by IAM policy, can be rotated by AWS rather than by a person, and leaves a trail in AWS. What stays in place matters just as much: Metabase still needs its own application database for questions, dashboards, users and permissions, which is a separate database with its own credentials, and the network path between Metabase and the RDS endpoint (security groups, subnets, routing and TLS) is unchanged by this switch.

Before you commit, confirm the current requirements in Metabase's AWS RDS documentation, decide which identity Metabase will assume, and list who in your organization owns the IAM policy and the database user grants. Treat the stored-password removal as one control among several: it does not replace the database user's privileges, which still determine what data Metabase can read, and it does not remove the need to protect the application database. Plan for these decisions before the build starts so the team can review them as part of your access model.

What you need before enabling IAM authentication for Metabase RDS

IAM authentication for Metabase touches the plan you buy, the database engine, the AWS account and the network path. Check each of these before you change anything on the RDS instance, because a gap in any one of them stops the connection from working at the point you are least able to diagnose it.

A Pro or Enterprise plan

IAM authentication is a Pro and Enterprise feature. Open source and Starter installations cannot select IAM Authentication in the database connection form, so the connection would fall back to a stored password. Confirm the plan on the instance before you plan the change, and ask your Metabase contact to confirm whether the plan covers the instance you run. The plan decision also affects SSO and permissions, so review those together.

Metabase pricing

Supported RDS and Aurora engines

Metabase supports IAM authentication for RDS PostgreSQL and MySQL and for Aurora PostgreSQL and MySQL. Check that your database is one of these four engines and note the engine version, because the Metabase driver and the AWS authentication requirements can change between versions. Confirm the supported engine versions in the Metabase AWS RDS documentation before you commit to a plan.

Metabase AWS RDS docs

AWS permissions to change instances and IAM

The person making the change needs rights to modify the RDS or Aurora instance settings, including turning on IAM database authentication, and rights to create an IAM policy and attach it to a role or user. Database administrators also need to run GRANT rds_iam on PostgreSQL or the equivalent user setup on MySQL. Agree who holds each permission before the change window, so the work does not stall on access requests.

A supported Metabase version

Run a Metabase version that your team supports and that receives security updates, since IAM authentication depends on the current driver behavior. Check the release on the version support page, and plan any upgrade as a separate change with an application database backup first. Do not combine a Metabase upgrade and an authentication change in the same window, so a failure can be traced to one cause.

Metabase version support

Network reachability to the endpoint

The Metabase server must reach the RDS or Aurora endpoint on the database port through security groups, route tables and any firewall between them. IAM authentication still opens a network connection, so an unreachable endpoint looks like an authentication failure. Test the path from the Metabase host with the database client tools before enabling the setting. Confirm whether the database is in a private subnet and whether an SSH tunnel is involved.

Certificate handling and TLS settings

IAM authentication tokens are typically used with TLS enabled, so the client must trust the AWS certificate chain for the database. Decide how the Metabase container or host will hold the trust material before the change, because a missing certificate produces connection errors that resemble IAM failures. Confirm the certificate handling steps and the bundled AWS certificates against the Metabase AWS RDS documentation.

Metabase AWS RDS docs

How to configure IAM authentication from AWS to Metabase

The sequence enables IAM authentication on the RDS or Aurora instance, grants a scoped IAM policy, creates a database user that accepts IAM tokens, and points Metabase at that user without a stored password. Each step ends with a check you can run before moving on.

  1. Enable IAM database authentication on the instance

    An AWS administrator turns on IAM database authentication for the RDS PostgreSQL or MySQL instance, or the Aurora cluster, in the AWS console or through the AWS CLI. The setting is a property of the database instance, so confirm it on the instance or cluster you intend to connect, not on a similar one in another account or region. Check that the setting shows as enabled and that the instance has finished applying the change before you continue. Ask your AWS team to confirm the exact console path for your engine version, since the wording of the setting can vary between AWS interfaces.

  2. Create the IAM policy for database connect

    Create an IAM policy that allows the identity Metabase runs under to request a database authentication token for the specific database user it will use. Scope the resource to that instance or cluster and to that one database user, rather than to all databases in the account. Attach the policy to the IAM role or user that Metabase's host or container uses, such as an instance role or task role. Verification: from a host that carries that role, generate a token with the AWS CLI for the target endpoint, port and user. A token string returned without errors confirms the policy works. If the call is denied, check the resource ARN and the account and region in it.

  3. Create the database user with IAM enabled

    A database administrator creates a dedicated database user for Metabase and grants it IAM access. On PostgreSQL, the user is created and then granted the rds_iam role with GRANT rds_iam, so the database accepts IAM tokens for that user. On MySQL, the user is created with the AWS authentication plugin so that it authenticates with tokens instead of a password. Grant that user read-only access to the schemas Metabase should query, following your data access model. Verification: connect with a client from a host using the IAM token as the password, and confirm that the login succeeds and that a read query on an allowed schema returns rows while a write attempt is refused.

  4. Select IAM authentication in Metabase

    A Metabase administrator opens the database settings in the Metabase admin panel, either for a new connection or an existing one, and sets the authentication method under Use an authentication provider to IAM Authentication. Enter the endpoint, port, database name and the IAM database user, and leave out any stored password. This option needs a Metabase Pro or Enterprise plan, so confirm the license before the change. Verification: run the connection test in the settings form, then save and confirm that a sample table loads in the data browser. If the test fails, compare the endpoint, user name and region against the values from the previous steps.

  5. Confirm token refresh and remove the old password

    After the connection works, confirm that Metabase continues to connect after the token lifetime has passed, since IAM tokens are short-lived and must be regenerated for new connections. Run a sync or a query at a later time, then review the Metabase database settings to make sure no old password remains stored for that connection. Also rotate or disable the previous database password for the user Metabase used before, so that a leaked old credential cannot log in. Ask your database team to confirm, in their own environment, how connection pooling interacts with token expiry before you rely on it for long-lived sessions.

How the IAM token replaces the password in the Metabase connection

With IAM authentication, the password field disappears from the Metabase connection. Instead, Metabase asks AWS for a short-lived authentication token generated for the database user and presents that token to RDS or Aurora when it opens a connection. The token is generated from the identity AWS sees on the Metabase host, so the instance profile or ECS task role attached to that host is what Metabase actually authenticates as. Confirm the token lifetime against the current AWS documentation for RDS IAM authentication before you set any session expectations, because this page does not state a figure.

The role on the Metabase host must be able to call the RDS connect action for the specific database user, and nothing broader. In practice that means an IAM policy that names the database resource ARN and the dbuser value that matches the database account created for Metabase, with the policy attached to the instance or task role. If Metabase runs on a host with a broad role shared by other workloads, every process on that host inherits the same database access, so review that role before you enable the option. The setup steps in the Metabase AWS RDS documentation cover the policy shape, and your security team should check it against least privilege.

The operational consequence is that credential lifecycle moves from Metabase to IAM. There is no database password stored in the Metabase connection settings to rotate, and revoking access means changing the IAM policy, the role attachment or the database user's IAM setting rather than editing a secret inside Metabase. Plan who owns those changes, how they are logged in CloudTrail, and how a leaver or a compromised host is handled. Also confirm how your Metabase version behaves when a token cannot be generated, since a failed role change will surface as connection errors on the Metabase side rather than as a password problem.

Mapping AWS identities, database users and Metabase connection settings

This table maps each AWS-side element of an IAM-authenticated RDS or Aurora connection to the Metabase setting it supports. Read it top to bottom as the order you configure things, and confirm every policy action against Metabase's AWS RDS documentation before you apply it.

AWS or Metabase elementWhat it does in this setupWhere it is set or confirmed
RDS or Aurora instance or clusterHosts the database and must have IAM database authentication turned on before any token login worksAWS console or CLI, database settings for IAM authentication
IAM role or principalThe identity Metabase uses to request a short-lived authentication token for the databaseIAM role attached to the Metabase host or task, or the principal Metabase runs as
IAM policyGrants the role permission to connect to the named database user, using the actions Metabase's docs specifyIAM policy attached to the role; confirm exact actions and resource ARNs in Metabase's AWS RDS docs
Database user with rds_iamA PostgreSQL user granted rds_iam, or a MySQL user set up for AWS authentication, so the token is accepted in place of a passwordSQL on the database, for example GRANT rds_iam TO the user on PostgreSQL
Use an authentication provider settingTells Metabase to use IAM Authentication instead of a stored password for the connectionMetabase database connection settings, option IAM Authentication
Database username fieldMust match the database user that holds the rds_iam grant and the IAM policy's connect permissionMetabase database connection settings, username
Plan requirementIAM authentication is a Pro and Enterprise feature, so Open Source and Starter installs cannot use this settingMetabase pricing page and the AWS RDS docs

Hardening the IAM connection to RDS

IAM authentication removes the stored database password, but it does not on its own limit what Metabase can read or where its credentials live. The cards below cover the controls that connect the IAM policy, the database user, the host identity and the application database, so a reviewer can check each layer separately.

Scope the IAM policy to one user

Write the rds-db:connect permission against the specific database user ARN, not a wildcard across all users in the instance. A policy that names the DB resource ID and the single user limits what a leaked token could do. Ask the reviewer to confirm the resource ARN format for your engine and region in the AWS documentation before the policy is approved, and test that a second user cannot connect with the same role.

Metabase RDS docs

Use a task or instance role

Attach the IAM role to the Metabase host or container task so the application obtains short-lived credentials automatically. Stored access keys in a configuration file or environment variable are the weakness this setup is meant to remove. Confirm that no long-lived access key remains on the host, in the container image or in the deployment manifest, and that the role cannot be assumed from unrelated workloads.

Restrict grants to analytics reads

The database user that Metabase authenticates as should hold rds_iam for IAM login and only the SELECT privileges that analysts need on the schemas they query. Avoid granting write, DDL or superuser rights, and avoid using the master user. Review the grants with the data owner, because the Metabase permissions model controls what users see inside Metabase but does not restrict what the database user can read.

Separate application and analytics databases

Keep the Metabase application database, which stores users, questions, dashboards and settings, on its own instance or at least under its own user and schema. Point the analytics connection only at the data warehouse or reporting replica. If the same database serves both roles, a query from an analyst can reach Metabase's own tables. Confirm the separation during the design phase, not after go-live.

Application database docs

Confirm the authentication method per engine

PostgreSQL 18 deprecates MD5 password authentication in favor of SCRAM, and PostgreSQL documents OAuth 2.0 as an authentication method in that release. Reviewers should confirm which method their engine version and pg_hba.conf rules actually use for the Metabase connection, and whether the RDS parameter settings match. Record the result in the design document so the audit trail shows the method, not an assumption.

PostgreSQL auth methods

Review the plan before rollout

IAM authentication is a Pro and Enterprise feature, so confirm the plan covers every Metabase instance that will use it, including staging. On open source, the same connection must use a stored credential, which changes the risk assessment. Ask the vendor or your own licensing contact to confirm the current plan terms in writing before the design is signed off.

Metabase pricing

Common failures when Metabase connects to RDS with IAM

This table lists the failures that most often stop Metabase from connecting to RDS or Aurora with IAM authentication, with the likely cause and the check to run for each. Work through the rows in order, since the plan check comes first and is the cheapest to rule out.

FailureLikely causeCheck to run
IAM option is missing in MetabaseThe instance runs the Open Source or Starter plan, where IAM authentication is not availableConfirm the plan in the Metabase admin settings and confirm that IAM authentication is a Pro or Enterprise feature before changing AWS settings
Login fails for the database userThe PostgreSQL user was created without the rds_iam role, or the MySQL user was not set to use the AWS authentication pluginConnect as an administrator and check that the user holds rds_iam (PostgreSQL) or the IAM plugin (MySQL) before retrying from Metabase
Access denied from AWSThe IAM policy names a different database user, a different DB resource ID, or a different region or account than the endpoint Metabase usesCompare the rds-db:connect resource ARN and database user name in the policy with the instance resource ID, region and user in the connection form
Token rejected though policy looks correctThe IAM identity used by the Metabase host is not the role the policy was attached to, often because the host runs under another role or an old instance profileConfirm which identity the Metabase host assumes, for example with the AWS CLI on the same host, and attach the policy to that role
IAM policy not applied at allIAM database authentication was never enabled on the RDS or Aurora instance, or the change was not appliedCheck the instance settings in the AWS console to confirm IAM database authentication is on, and apply the change if it is pending
Connection times out or refusesSecurity group, route table or network ACL does not allow traffic from the Metabase host to the database endpoint on the database portTest reachability from the Metabase host to the endpoint and port, then review security group rules and whether the instance is publicly reachable
TLS handshake or certificate errorsSSL is required by the instance but the Metabase connection does not validate or trust the AWS certificate chainConfirm the SSL setting in the connection form and that the host trusts the AWS root certificate used by the RDS endpoint
Token expires during long syncsIAM tokens are short-lived, and a connection pool or scan holds a connection beyond the token lifetimeConfirm how Metabase refreshes IAM tokens for new connections and watch sync logs for authentication errors that start after a period of activity

Questions buyers ask about Metabase RDS IAM authentication

Does Metabase IAM authentication for RDS work on Open Source or Starter?

No. IAM authentication for RDS PostgreSQL, RDS MySQL, Aurora PostgreSQL and Aurora MySQL is a Pro and Enterprise feature, according to Metabase's AWS RDS documentation. On Open Source and Starter, Metabase connects with a stored database password. Those plans can still connect to the same databases, so the choice is whether removing stored passwords justifies moving to Pro. The Metabase pricing page lists Pro at $575 per month, or $517.50 per month billed yearly, with the first 10 users included and additional users at $12 per month. Confirm current prices on that page before you budget, since they can change.

What does it cost to set up RDS IAM authentication for Metabase?

The cost has three parts. The first is the Metabase plan, which must be Pro or Enterprise. Enterprise is priced by quote, starting at $20,000 per year according to the pricing page. The second is internal or partner time on the AWS side, covering enabling IAM authentication on the RDS or Aurora cluster, writing the IAM policy and reviewing it. The third is database administrator time, covering creating the database user and granting rds_iam on PostgreSQL. Most of this work is one-time. The recurring costs are the plan subscription and ongoing review of the policy and user. Ask any quote to list these three parts separately and to state whether it covers testing against your staging database.

Can our own team set up RDS IAM authentication for Metabase without a partner?

Yes, if your AWS and database administrators can make the changes. The work is a sequence of ordinary steps: enable IAM authentication on the RDS instance, create an IAM policy that allows the Metabase role to generate database tokens, create the database user with IAM enabled, and select IAM Authentication under Use an authentication provider in Metabase. The harder part is usually the approvals. The change touches production database access, so your change control process, separation of duties and rollback plan decide how fast your team can finish. A partner adds value when your team lacks experience with RDS authentication or needs evidence for an assessor.

How long does the RDS IAM authentication change take?

The duration depends mostly on access and change control, not on the Metabase configuration itself. If the people who own the RDS cluster, the IAM roles and the Metabase server can work together and the change can go through a standard window, the work can be finished quickly. If each change needs separate tickets, security review and a production freeze, expect the calendar to stretch. Ask any provider for a schedule built from your approval steps, the number of environments to test in, and when the production window opens. Do not accept a timeline that ignores those gates.

What do we need to provide before starting the work?

Prepare access and information before the work starts. You need the RDS or Aurora engine type and version, the cluster or instance identifiers, the AWS account and region, and the place where Metabase runs, such as an EC2 instance, container or Kubernetes workload. You also need administrative access to the database for creating users and granting roles, permission to create or edit IAM policies, and a staging environment where the connection can be tested first. Finally, document the Metabase application database location and backup status, because a failed change should not leave Metabase without a working connection.

Does the PostgreSQL version affect the Metabase connection?

Yes, because unsupported versions create risk for the database that Metabase depends on. PostgreSQL 14 is supported until November 12, 2026, and PostgreSQL 15 until November 11, 2027, according to the PostgreSQL versioning policy. PostgreSQL 13 and earlier are no longer supported. Before you change authentication, confirm the engine version on the RDS or Aurora cluster and plan any major upgrade separately, since a major upgrade changes the database under the connection. Test IAM authentication again after any major upgrade, because the authentication and role configuration should be verified on the new version.

Who in our team must act for the change to succeed?

Three roles are involved. The AWS administrator enables IAM authentication on the database and writes the IAM policy. The database administrator creates the database user with IAM enabled and grants rds_iam on PostgreSQL. The Metabase administrator selects IAM Authentication under Use an authentication provider and checks that sync succeeds. A security or compliance reviewer should approve the policy and the removal of stored passwords. If one of these roles is outside your team, agree who signs off each step in writing before the change starts.

How the Metabase host, IAM and RDS exchange credentials

The flow starts on the Metabase host, which assumes an AWS role that carries the IAM policy for database connect. That role requests a short-lived authentication token from RDS, and Metabase uses the token in place of a stored password when it opens the connection to the RDS or Aurora endpoint. The database user must be created with IAM enabled (for PostgreSQL, through GRANT rds_iam), or the token will not be accepted. Check that the trust boundary between the AWS account and the database is where you expect it to be, and that the policy grants only the database user Metabase needs.

Metabase uses an IAM role and a short-lived token instead of a stored database password.

Plan tier and Metabase version choices that affect this connection

IAM authentication for RDS and Aurora is a Pro or Enterprise feature. The Open Source and Starter plans keep password-based connections to the database, so a team on either plan cannot replace stored passwords with IAM tokens. Before any AWS work starts, confirm the plan that will run the instance, because upgrading the plan later is a licensing step that changes the scope of the rollout. Pricing is listed on the Metabase pricing page, and the cost difference between Starter and Pro should be weighed against the other Pro features the team needs, such as SSO and permissions, not against this connection alone.

Choose the Metabase release line before you change the connection. Check the Metabase version support page for the current LTS release, its end-of-life date and the support window for any non-LTS release you are considering. LTS versions are supported for 14 months, while non-LTS versions usually reach end of life after about 2 months, so a non-LTS build can fall out of support soon after a rollout. Confirm the support dates on the day you plan the change, since they move with each release.

Plan the connection change alongside the next upgrade, not as a separate task. Metabase runs application database migrations automatically when it starts a new version, so an IAM change made on an old release and then followed by an upgrade doubles the number of moving parts during one maintenance window. Back up the application database first, and decide whether the Use an authentication provider change and the upgrade will be tested together on a staging instance. Record which release and plan each environment runs so a rollback has a known starting point.

How DeployOpen scopes and delivers Metabase IAM authentication

DeployOpen treats IAM authentication for Metabase as a scoped change to how the application reaches RDS or Aurora, not as a one-line configuration edit. We plan the AWS, database and Metabase changes together, then build, test and document them in infrastructure you control so your security and platform teams can review the result.

How we scope

  • Confirm whether your Metabase edition includes IAM authentication, since it is a Pro and Enterprise feature.
  • Inventory the RDS or Aurora PostgreSQL or MySQL instances Metabase connects to, and the databases and users each one serves.
  • Agree in writing which IAM policies, database users, networks and Metabase connections are in scope before work starts.

How we build

  • Enable IAM database authentication on the target instance and confirm the change in a non-production environment first.
  • Write a least-privilege IAM policy scoped to the specific database user and resource, then review it with your AWS administrators.
  • Create the database user with IAM enabled, grant rds_iam for PostgreSQL, and switch the Metabase connection to IAM Authentication.

How we hand over

  • Document each IAM role, policy, database user and Metabase setting, with the reason for each choice and its owner.
  • Provide test evidence showing the connection works through IAM and that stored passwords have been removed from the configuration.
  • Walk your platform and security teams through token renewal, rotation of the Metabase application database, and the rollback path.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, including checks after Metabase or RDS upgrades.
  • Retest the connection and IAM permissions after changes to the instance, network path, Metabase version or identity policies.
  • Confirm with your AWS account team and Metabase licensing terms before scoping, since plan and feature details can change.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.