QueryProxy

QueryProxy vs AWS IAM database authentication

IAM database authentication lets you connect to an RDS instance with a short-lived token instead of a password. It settles who is connecting, and leaves the statements they then run unreviewed.

Updated:

At a glance

AspectQueryProxyAWS IAM database authentication
Question answeredMay this statement run?Is this identity allowed to connect?
What replaces the passwordAn encrypted vault; developers never hold the credentialAn authentication token generated for the caller, valid for 15 minutes
After the connection opensEach statement is parsed and approved before it runsThe token "doesn't affect the session after it is established"
Statement reviewUPDATE and DELETE need a WHERE, SELECT gets a LIMITNone; the database receives whatever the user sends
ApprovalA DBA approves, from the web or Slack or TeamsNone
Result maskingPII masked while the result is writtenNone
Database enginesPostgreSQL, MySQL, MariaDB, SQL Server, SQLiteMariaDB, MySQL and PostgreSQL on Amazon RDS, by the page cited
Audit trailImmutable log of every request, decision and executionAWS documents that CloudWatch and CloudTrail do not log IAM authentication

IAM database authentication and QueryProxy are not competitors. One settles who is connecting; the other settles what they may run once connected.

AWS’s documentation says IAM database authentication works with MariaDB, MySQL and PostgreSQL. You connect with an authentication token instead of a password, and each token has a lifetime of 15 minutes. AWS adds that the token “is only used for authentication and doesn’t affect the session after it is established.”

That last sentence is the boundary. Once the connection is open, the database sees a user with certain privileges. It does not see an approval.

What does IAM authentication not cover?

An engineer who connects with a valid token can still run DELETE FROM orders. No component reads the statement, asks a second person, or hides the email column in the result. This is the argument of what database access control is: authentication is not access control.

QueryProxy covers the missing steps, and the quick start shows how to run it. The statement is parsed against the SQL guards, a DBA approves it in the approval workflow, and the result is masked before it is stored.

What are the documented limits?

The AWS page lists limitations. Among them: not all global condition context keys are supported; for PostgreSQL, once rds_iam is added to a user, IAM authentication takes precedence over the password; CloudWatch and CloudTrail do not log IAM authentication; and the feature needs between 300 and 1000 MiB of extra memory on the instance. It also says it is not supported for RDS on Outposts.

QueryProxy has limits too. Its guards are static and best-effort, and the denylist is incomplete by nature; the authority is the DBA’s approval. Database-side read-only execution is planned for v0.3.0, so the hardening guide advises a SELECT-only connection as well.

Which one do you need?

Often both. Applications that connect as IAM principals gain from tokens, and QueryProxy keeps the database credential in its vault rather than using IAM tokens. People who need to look at production data gain from a queue; if they share a password today, see production access without shared passwords. They are different callers, and the same database can have both.

AWS’s page says feature availability varies by engine version and Region; check that page for your configuration. It was read on 2026-10-13. Passwords on a bastion host are a related problem with a different fix. Engine-specific notes are on the PostgreSQL and MySQL and MariaDB pages.

When to choose AWS IAM database authentication instead

  • Your only goal is to stop passwords from living in application code or config files. IAM database authentication does that natively, with no extra service to run.
  • Your databases are on RDS and your callers are applications running as IAM principals, such as EC2 instances. AWS documents this as the case it suits, and a human approval queue would only get in the way.
  • You are looking for access control inside AWS, with IAM policies tied to roles and accounts. QueryProxy does not read IAM.

Visit AWS IAM database authentication

Frequently asked

Does RDS IAM authentication review the SQL that gets run?
No. The AWS documentation describes the token as used only for authentication, and says it does not affect the session after it is established. A user who connects with a valid token can send any statement their database privileges allow.
Can I use IAM database authentication with QueryProxy?
Not directly. QueryProxy's documentation describes target credentials held in its encrypted vault, and does not describe IAM tokens. Use IAM authentication for your applications and QueryProxy for people who need ad-hoc access to the same data.
What limits does IAM database authentication have?
AWS lists several, including that it does not support all global condition context keys, that CloudWatch and CloudTrail do not log IAM authentication, and that it needs between 300 and 1000 MiB of extra memory on the database. Read the full list on the AWS page before relying on it.
Does IAM authentication remove shared passwords?
For the identities that use it, yes, since there is no password to share. People who still need ad-hoc production access need some other path, and handing out a shared password is what QueryProxy exists to avoid.

Arrow keys to move, Enter to open.