반응형

팀즈(Teams)에서 AWS 코드커밋(CodeCommit)에 커밋을 할 때마다 팀즈 채널에 알림이 오도록 설정하는 와중에  an error occurred AccessDeniedException when calling the GetCommit operation 에러가 발생했다.

 

에러 원문

An error occurred (AccessDeniedException) when calling the GetCommit operation: User: arn:aws:sts::ID:assumed-role/CommitAlert-role-o1yetkui/CommitAlert is not authorized to perform: codecommit:GetCommit on resource: arn:aws:codecommit:ap-northeast-2:ID:test because no identity-based policy allows the codecommit:GetCommit action

 

이 에러가 발생한 이유는 접근 거부 당해서 그렇다. 그래서, 권한 정책을 추가적으로 줘야 한다.

 

1. Lambda 서비스에 접속하여 해당 함수의 실행 역할 이름을 클릭하여 권한으로 이동한다.

 

 

2. 해당 역할에 권한이 없어 발생한 문제이므로, 권한 정책에서 CodeCommit과 Lambda에 대한 FullAccess 권한을 줬다.

 

 

3. 그리고 나서, 다시 진행하면 정상적으로 작동되는 것을 확인할 수 있다.

 

이제는 정상적으로 작동하는 것을 확인했으니, 알림 메시지를 커스터마이징을 하기만 하면 된다.

반응형
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기