Skip to content

Chore: Azure Blob → AWS S3 스토리지 전환 및 prod 프로파일 AWS 이관 (#38) - #41

Merged
xYunaL merged 7 commits into
devfrom
chore/#38-s3-migration
Sep 5, 2026
Merged

Chore: Azure Blob → AWS S3 스토리지 전환 및 prod 프로파일 AWS 이관 (#38)#41
xYunaL merged 7 commits into
devfrom
chore/#38-s3-migration

Conversation

@xYunaL

@xYunaL xYunaL commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

🔗 Related Issue

📝 Summary

  • 이미지 스토리지를 Azure Blob(SAS) → AWS S3(presigned URL) 로 교체
  • prod 프로파일을 RDS·SSM 기준으로 재구성.
  • Azure 의존성 모두 제거.

🚀 Key Changes

  • S3 스토리지 계층 신규S3Properties(@ConfigurationProperties) · S3StorageConfig · S3StorageService
  • presigned URL 방식 전환 — 업로드 PUT / 읽기 GET, 자격증명은 ECS 태스크 역할에 위임
  • 키 네임스페이스 도입scans/{userId}/{uuid}.{ext}, S3 lifecycle(90일 만료) 규칙과 정합
  • 소유권 검증 추가 — resolveKey가 형식·경로순회, 타 사용자 키를 차단
  • 업로드 사후 검증 추가 — verifyUploadObject로 실제 업로드 여부·크기·타입 확인
  • Azure 의존성 제거
  • prod 프로파일 이관 — Key Vault 제거, DB_HOST 기반 접속, sslmode=require 유지
  • Jackson 3으로 통일
  • CloudFront 경로 정정path_pattern /images/*/menus/*

💥 Breaking Changes

  • FE 업로드 헤더 2종 필수 — presigned PUT 요청에 Content-Type(티켓 발급 시와 동일)과 If-None-Match: * 필요. 누락 시 403 SignatureDoesNotMatch
  • 컨테이너 단위 SAS 개념이 S3에 없으므로, FE는 매 업로드마다 POST /api/v1/uploads/sas 호출 필수
  • UploadTicketResponse.readUrl 제거 — 3필드로 축소
  • storageKey 형식 변경menu-{uuid}.jpgscans/{userId}/{uuid}.jpg
  • menu_images.image_url 의미 변경 — https URL → s3:// URI (비공개 버킷이라 평문 URL은 403)

✅ Self-Check List

  • spotlessApply(palantirJavaFormat) 포맷팅을 적용했습니다.
  • Optional·명시적 예외 처리로 null 안전성을 확보했습니다.
  • 코드에 불필요한 주석이나 System.out.println, TODO가 남아있지 않습니다.
  • ./gradlew build 통과 (테스트 96건 / 실패 0건)

@xYunaL xYunaL self-assigned this Sep 5, 2026
@xYunaL xYunaL linked an issue Sep 5, 2026 that may be closed by this pull request
4 tasks
@xYunaL
xYunaL merged commit 88258fe into dev Sep 5, 2026
1 check passed
@xYunaL
xYunaL deleted the chore/#38-s3-migration branch September 5, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] Azure Blob → S3 전환 및 prod 프로파일 AWS 이관

1 participant