카테고리 없음

s3 An error occurred (AccessDenied) when calling the PutObject operation: Access Denied

시스템엔지니어 2025. 7. 17. 21:47

upload failed: s1 to s3://s1 An error occurred (AccessDenied) when calling the PutObject operation: Access Denied

 

권한설정을 잘 줘도 위와 같이 에러가 나는 경우

 

 

AWS CLI 및 SDK 특정 버전(예: AWS CLI v2.23.0, boto3 1.36) 이후 버전에서는 Object Storage에서 지원하지 않는 새로운 체크섬 알고리즘이 기본적으로 활성화되기 때문에 요청에 실패한다. 따라서 이전 버전을 사용하거나, 최신 버전에서 해당 체크섬 설정을 비활성화가 필요하다.

 

<예시>
$ cat ~/.aws/config
[default]
request_checksum_calculation = WHEN_REQUIRED
response_checksum_validation = WHEN_REQUIRED

Terraform 사용 시:
최신 버전을 사용하는 경우, skip_s3_checksum = true 

 

스프링부트 프레임워크에서 application.yml에 설정시

  cloud:
    aws:
      s3:
        endpoint: https://kr.object.private.fin-ncloudstorage.com
        region: kr-standard
        checksum-validation-enabled: false  ##이부분 추가
      region:
        static: kr-standard
      credentials:
        access-key: 123123123123
        secret-key: 123123123123123123