Openshift AWS RDS IAM Connect

Openshift AWS RDS IAM Connect solves this. It’s the cleanest way to link workloads on OpenShift to an Amazon RDS instance using AWS IAM authentication, keeping credentials short-lived and locked down.

Here’s the flow:

  1. Enable IAM Authentication on RDS – Modify your RDS instance in AWS to allow IAM auth. Supported engines include MySQL, PostgreSQL, and Aurora.
  2. Grant Access via AWS IAM Policies – Create or update an IAM role with rds-db:connect permissions for the specific DB resource.
  3. Integrate OpenShift Service Account with AWS IAM – Use OpenShift’s support for IRSA (IAM Roles for Service Accounts) or leverage an OIDC provider. This binds the service account running your pod to the IAM role.
  4. Generate Auth Tokens in the Pod – Your workload uses the AWS SDK or CLI inside the container to request an RDS IAM auth token at runtime. Tokens expire quickly, typically within 15 minutes.
  5. Use the Token in Database Connections – Pass the token as your password during the initial handshake with RDS, over TLS.

This pattern eliminates static credentials. No secrets in ConfigMaps. No rotated passwords forgotten. Just short-lived tokens tied to a workload identity. AWS handles rotation. OpenShift handles scheduling. And you control it all centrally.

Common pitfalls:

  • Missing trust relationship between IAM role and the cluster’s OIDC provider.
  • RDS parameter group not enabling IAM for your engine.
  • Token generation done too early, leading to expiry before connection.

Best practice: Generate tokens inside the pod right before use, and ensure TLS is enforced to protect token confidentiality.

By aligning OpenShift, AWS RDS, and IAM Connect, you get secure, scalable database access that fits modern infrastructure. No legacy secrets. No manual rotation.

Want to see this running in minutes? Try it live with hoop.dev and connect OpenShift to AWS RDS IAM without touching static credentials.