Search code examples
amazon-web-servicesaws-glueamazon-athena

Restrict user from executing INSERT queries on athena


I want to restrict user from executing INSERT queries in master table(Not CTAS table) in athena. If there way, I can achieve this ? user will executing queries from Lambda.


Solution

  • Athena just supports StartQueryExecution and StopQueryExecution as actions in IAM permission policies - so there is no differentiation which type of SQL Command (DDL, DML) is being executed.

    However, I think you can overcome this by denying permissions on glue and S3 so Athena queries that try to execute INSERTs will fail: