목록2024/05/30 (2)
개발학습일지
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/Ga4Oy/btsHIWN83kI/xvu1e39wtoM77z0sOaulsk/img.png)
IAM 사용자 권한 할당량을 초과한 경우 해결 방법 문제 상황: Amazon Translate을 사용하려고 하는데,ClientError: An error occurred (AccessDeniedException) when calling the TranslateText operation: User: arn:aws:iam::590183939047:user/api_dev is not authorized to perform: translate:TranslateText because no identity-based policy allows the translate:TranslateText action 이런 오류가 생겼다. 해결 방법: AWS IAM 사용자에게 권한을 할당해 준다. 추가 문제 발생: 번역 주려고 했..
Amazon Translate를 이용해서 API 만드는 파일 안에서 번역하기 번역해 주는 함수를 만들어서 사용한다. # 함수 괄호 안에 self를 해야 같은 파일 안에서 함수를 사용할 수 있다. def translate(self, text) : # 일시킬 client 만들어 준다. # IAM에서 번역만 할 새로운 사용자를 만들어 권한을 부여해줬다. client = boto3.client(service_name='translate', region_name='ap-northeast-2', aws_access_key_id = Config.AWS_TRANSLATE_..