-
[code deploy] code deploy중 access deniedT-note 2024. 2. 16. 14:09728x90
현재 상황
github action이 성공적으로 빌드가 되며, aws에서 code deploy가 성공적으로 실행이 되었는지 확인중 에러가 발생했다.
access denied 위의 사진과 같이 downloadBundle 도중 access denied 에러가 발생했다
문제 원인
s3 bucket에 버킷 정책 설정을 해주지 않아서 그런것이다.
해결 방안
s3의 권한 부분에서 정책 결정하는 부분에 아래와 같이 작성해주기
{ "Version": "2012-10-17", "Id": "Policy1705987450879", "Statement": [ { "Sid": "Stmt1705987445240", "Effect": "Allow", "Principal": "*", "Action": [ "s3:DeleteObject", "s3:GetObject", "s3:PutObject" ], "Resource": "arn:aws:s3:::tnote-bucket-cicd/*" } ] }
참고로 Resource 부분은 해당 버킷이름마다 다르다.
결과
결과 페이지 'T-note' 카테고리의 다른 글
[Tnote] ec2와 route53 도메인 연결하기 (0) 2024.02.20 [error] Error creating bean with name 'jwtTokenProvider': Injection of autowired dependencies failed (0) 2024.02.16 [Tnote] error: variable userRepository not initialized in the default constructor (0) 2024.02.15 [error] build 오류 (0) 2024.02.10 [error] Name for argument of type [java.lang.Long] not specified (0) 2024.01.09