준비된 문에 대한 액세스 구성
이 주제에서는 Amazon Athena의 준비된 문에 대한 IAM 권한에 대해 다룹니다. IAM 정책을 사용할 때는 항상 IAM 모범 사례를 따라야 합니다. 자세한 내용은 IAM 사용 설명서의 IAM 보안 모범 사례를 참조하세요.
준비된 문에 대한 자세한 내용은 파라미터화된 쿼리 사용 단원을 참조하세요.
준비된 문을 생성, 관리, 실행하는 데 필요한 IAM 권한은 다음과 같습니다.
athena:CreatePreparedStatement athena:UpdatePreparedStatement athena:GetPreparedStatement athena:ListPreparedStatements athena:DeletePreparedStatement
다음 표에 나타난 대로 이 권한을 사용해야 합니다.
목적 | 사용할 권한 |
---|---|
PREPARE 쿼리 실행 |
athena:StartQueryExecution
athena:CreatePreparedStatement |
기존의 준비된 문을 업데이트하기 위해 PREPARE 쿼리 재실행 |
athena:StartQueryExecution
athena:UpdatePreparedStatement |
EXECUTE 쿼리 실행 |
athena:StartQueryExecution
athena:GetPreparedStatement |
DEALLOCATE PREPARE 쿼리 실행 |
athena:StartQueryExecution
athena:DeletePreparedStatement |
예
다음의 IAM 정책 예제는 지정된 계정 ID 및 작업 그룹에 준비된 문을 관리하고 실행할 수 있는 권한을 부여합니다.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "athena:StartQueryExecution", "athena:CreatePreparedStatement", "athena:UpdatePreparedStatement", "athena:GetPreparedStatement", "athena:DeletePreparedStatement", "athena:ListPreparedStatements" ], "Resource": [ "arn:aws:athena:*:
111122223333
:workgroup/<workgroup-name>
" ] } ] }