I have an RDS Aurora PostgreSQL cluster with IAM-based authentication enabled. To connect, I need to call the GenerateRDSAuthToken API to generate a temporary token to use as the password. Here's an example CLI command.
aws rds generate-db-auth-token --hostname some-postgres-host --port 5432 --region us-west-2 --username some-username
The tokens only last 15 minutes. It would be really helpful if there was a way to configure a postgres secret to get the password through the above API call or by invoke a CLI command.