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:
- Enable IAM Authentication on RDS – Modify your RDS instance in AWS to allow IAM auth. Supported engines include MySQL, PostgreSQL, and Aurora.
- Grant Access via AWS IAM Policies – Create or update an IAM role with
rds-db:connectpermissions for the specific DB resource. - 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.
- 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.
- 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.