피드로 돌아가기
Building My First AI Agent with Strands SDK and Amazon Bedrock Errors, Fixes & Lessons Learned
Dev.toDev.to
AI/ML

Strands SDK와 Amazon Bedrock 기반 AI Agent의 환경 설정 및 런타임 제약 해결

Building My First AI Agent with Strands SDK and Amazon Bedrock Errors, Fixes & Lessons Learned

Tidding Ramsey2026년 5월 9일6beginner

Context

Strands SDK와 Amazon Bedrock을 활용하여 다중 도구를 사용하는 AI Agent를 구축하려는 시도. 단순한 코드 구현보다 AWS 인프라의 계정 권한, 모델 접근 제어, 의존성 패키지 등 환경 설정 단계의 병목 지점이 주요 장애 요인으로 작용.

Technical Solution

  • Anthropic Use Case Form 제출을 통한 모델 접근 권한 확보로 ResourceNotFoundException 해결
  • botocore[crt] 패키지 추가 설치를 통해 Windows 환경의 AWS 로그인 자격 증명 공급자 의존성 문제 해결
  • aws bedrock list-inference-profiles 명령어를 통한 계정별 유효 Model ID 검증 및 BedrockModel 객체 내 명시적 할당
  • @tool 데코레이터를 이용한 도구 정의와 Agent 클래스의 도구 리스트 바인딩을 통한 Function Calling 구조 설계
  • Input → Reasoning → Tool Selection → Tool Execution → Response로 이어지는 Agent 루프 구현

1. Bedrock 모델 사용 전 Anthropic Use Case Form 제출 여부 확인

2. 모델 ID 추측 대신 CLI를 통해 계정 내 유효 Inference Profile ID 확인

3. Windows 환경에서 AWS Credential Provider 사용 시 botocore[crt] 설치 필수

4. SDK 기본값에 의존하지 않고 BedrockModel 클래스로 모델과 리전을 명시적으로 정의

원문 읽기