전체보기/AWS(Amazon Web Services)

[AWS] An error occurred (AccessDeniedException)

피망우유 2020. 2. 23. 11:11

인스턴스에서 자신의 버킷에 접근하여 AWS의 rekognition API에 접근하여 결과를 보고싶은데(개복잡)

다음과 같은 에러가 출력된다면...

 

An error occurred (AccessDeniedException) when calling the ~: ~ is not authorized to perform : ~

 

권한이 없다는 데 무엇이 문제일까 알아보자.

$  aws rekognition detect-labels \ --image '{"S3Object":{"Bucket":"bucket","Name":"file"}}' 

내가 생성한 인스턴스에서 내 버킷에 접근하여 해당 이미지를 AWS API인 rekognition를 사용하고 싶다.

권한이 없다는 에러 메시지가 표시된다면 자신의 IAM 권한을 살펴보자.

https://docs.aws.amazon.com/ko_kr/rekognition/latest/dg/images-s3.html

AmazonRekognitionFullAccess 권한이 없다. 추가해주자.

(차라리 처음 생성할 때 모든 권한을 추가해버리면 어떨까)

 

성공!