Skip to content

refactor: AWS SDK v2로 S3 연동 전환#611

Open
Whale0928 wants to merge 4 commits into
mainfrom
codex/aws-sdk-v2-migration
Open

refactor: AWS SDK v2로 S3 연동 전환#611
Whale0928 wants to merge 4 commits into
mainfrom
codex/aws-sdk-v2-migration

Conversation

@Whale0928
Copy link
Copy Markdown
Collaborator

@Whale0928 Whale0928 commented May 22, 2026

변경 요약

  • AWS SDK Java v1 S3 의존성을 v2 S3Client/S3Presigner 기반으로 전환
  • ImageUploadService의 presigned PUT URL 생성을 v2 S3Presigner.presignPutObject로 변경
  • MinIO/Testcontainers 테스트 인프라를 v2 클라이언트 기준으로 정리
  • S3 관련 com.amazonaws.*, aws-java-sdk-s3, libs.aws.s3 잔존 제거
  • v1 AmazonS3 fake fixture 삭제
  • 리뷰 이미지 업로드 흐름 검증 테스트 추가

운영 호환성 보강

  • presign URL 응답 전 ResourceLog CREATED가 저장되도록 생성 로깅을 동기화
  • 공통 ResourceVerifierService 추가
  • 리뷰 생성/수정 전 이미지 URL의 resourceKey, ResourceLog 존재 여부, 소유자, 원본 viewUrl, 상태 검증
  • 임의 viewUrl과 타 사용자 viewUrl은 리뷰 저장 전 4xx로 거부
  • CloudFront URL trailing slash normalize 보강
  • 계획 문서: plan/aws-sdk-v2-resource-verify-followup.md
  • 후속 보강 커밋: 5471cb5bdbb3a7cc066534d38131aa049290c835

검증

  • git diff --check PASS
  • rg -n "com\\.amazonaws|aws-java-sdk-s3|libs\\.aws\\.s3" gradle/libs.versions.toml bottlenote-* 결과 0건
  • ./gradlew compileJava compileTestJava PASS
  • ./gradlew :bottlenote-product-api:test --tests '*ImageUploadServiceTest' :bottlenote-mono:test --tests '*ImageUploadUnitTest' :bottlenote-product-api:integration_test --tests '*MinioContainerLoadingTest' PASS
  • ./gradlew admin_integration_test PASS
  • ./gradlew unit_test PASS
  • 후속 보강 후 /verify full 수준 검증 PASS
    • compileJava compileTestJava
    • admin Kotlin compile
    • check_rule_test
    • unit_test
    • build -x test -x asciidoctor --build-cache --parallel
    • integration_test
    • admin_integration_test
    • asciidoctor

리스크/주의사항

  • v2 presigned URL은 content-type 서명 헤더를 포함하므로 클라이언트 PUT 요청 시 동일한 content type 전달이 필요
  • 운영 AWS bucket/region/CloudFront 실계정 smoke test는 별도 배포 전 확인 대상
  • Gradle 9 deprecation warning은 남아 있으나 현재 실패 요인은 아님

관련 기술 부채

  • 7.1 AWS SDK Java v1 지원 종료

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant