Skip to content

Aurora DSQL: Parse AWS IAM role mappings - #7

Merged
amaksimo merged 2 commits into
dsql-async-indexfrom
fix/dsql-iam-grants
Oct 15, 2026
Merged

amaksimo merged 2 commits into
dsql-async-indexfrom
fix/dsql-iam-grants

Conversation

@amaksimo

Copy link
Copy Markdown
Owner

Why

Aurora DSQL uses AWS IAM GRANT and AWS IAM REVOKE to associate
PostgreSQL database roles with IAM principals. dsql-lint needs structured
parser output for these statements before its compatibility rules can evaluate
them.

AWS IAM GRANT app_role TO 'arn:aws:iam::123456789012:role/app';
AWS IAM REVOKE app_role FROM 'arn:aws:iam::123456789012:role/app';

What

  • Add dedicated AST variants and round-trip parsing for both statements in the
    PostgreSQL and generic dialects, including quoted and comma-separated roles
    and ARN literals.
  • Keep AWS and IAM available as unreserved identifiers and expose a dialect
    opt-in for custom dialects.
  • Bump sqlparser-dsql to 0.62.10 for the linter dependency update.

Testing

  • cargo test --all-features passed; the independent test audit proved all 13
    changed tests, and review panel round 3 passed.
  • Formatting, Clippy and documentation with warnings denied, and
    git diff --check passed.
  • The thumbv6m-none-eabi no-std check and cargo publish --dry-run passed.

References

- Parse AWS IAM GRANT and REVOKE in PostgreSQL and generic dialects.
- Preserve database role and IAM ARN lists in dedicated AST variants.
- Bump sqlparser-dsql to 0.62.10.

Fixes awslabs/aurora-dsql-tools#197
@amaksimo
amaksimo marked this pull request as ready for review October 15, 2026 19:12
@amaksimo
amaksimo merged commit 77180e4 into dsql-async-index Oct 15, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant