You must implement guardrails for an agent that converts user requests into SQL queries against an Athena catalog. Which combination best reduces the risk of prompt injection leading to data exfiltration?

Answer

Whitelist only specific tables/columns via tool-level enforcement, validate generated SQL against an allowlist, and restrict credentials/permissions used by the execution role.

Explanation

Even with good prompts, injection can change instructions. Tool-level enforcement and SQL validation ensure only approved schema elements can be queried, under least-privileged credentials.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list