fix(backend): add boto3 dependency required for Bedrock client#62
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: Bedrock 호출을 위한 boto3 의존성 추가
Amazon Bedrock Provider 도입 이후 Elastic Beanstalk 환경에서
ModuleNotFoundError: No module named 'boto3'오류로 인해애플리케이션 Worker가 정상적으로 부팅되지 않는 문제가 발생했습니다.
본 PR에서는 Bedrock client 생성 시 필요한
boto3패키지를backend
requirements.txt에 추가하여 해당 문제를 해결합니다.📌 문제 원인
Bedrock 호출을 위해
chain_builder.py에서 boto3를 사용하고 있으나EB 배포 환경에서는
requirements.txt에 해당 패키지가 포함되지 않아다음 오류가 발생했습니다.
예시 로그:
ModuleNotFoundError: No module named 'boto3'
이로 인해 Gunicorn worker가 부팅에 실패하면서
Elastic Beanstalk 환경에서 다음 상태가 발생했습니다.
Worker failed to boot
100% of requests failing with HTTP 5xx
🔧 수정 내용
requirements.txt에boto3의존성 추가추가된 패키지:
boto3
⚙️ 영향 범위
다음 항목에는 영향이 없습니다.
즉 기존 OpenAI-only 환경과 완전히 호환됩니다.
🎯 변경 목적
🚀 기대 효과
이번 수정으로 다음 구조가 정상 동작하게 됩니다.
LLM Router
├ OpenAI
└ Bedrock (boto3 client)
이를 통해 Dev 환경에서 OpenAI ↔ Bedrock 간
LLM A/B 실험을 정상적으로 수행할 수 있습니다.