You finally get Metabase spinning on your EC2 instance and realize you just hardcoded your database credentials. A few lint warnings and a Slack message later, you promise yourself to hook up AWS Secrets Manager next time. This is that next time.
AWS Secrets Manager handles sensitive credentials securely so they never sit in plaintext on disk or in version control. Metabase, the open-source analytics app, connects to your data warehouses to run queries and visualize results. Together they let you run internal dashboards while keeping keys and passwords locked behind IAM policies instead of sprinkled across config files.
The integration works like this: Secrets Manager stores the database username, password, and connection string. You assign a policy allowing your Metabase service role (or ECS task role, or EC2 instance profile) to read that secret. When Metabase starts, it fetches the secret through a secure API call over TLS. No human interaction, no clipboard mishaps, no “oops” moments in Git history.
For environments using AWS IAM or OIDC with Okta or other providers, map each identity role carefully. Keep secrets access read-only and compartmentalized per environment. Rotate credentials automatically using AWS rotation hooks or your CI/CD pipeline so tokens never linger. Metabase supports environment variables for database credentials, so pulling fresh secrets before container startup is reliable and repeatable.
Featured answer: To connect Metabase with AWS Secrets Manager, create a secret containing your database credentials, attach a permissions policy for the Metabase instance role, and configure Metabase to read those values via environment variables or startup scripts accessing the AWS API. This ensures secure, automated credential management without manual updates.