AWS Emulator 환경 (WSL2 Ubuntu 네이티브)

로컬에서 AWS API를 흉내내는 공식 에뮬레이터(AWS Emulator) 환경입니다.
AWS 계정 없이, 실제 AWS를 호출하지 않고 애플리케이션을 테스트할 수 있습니다.

폴더 구성

aws-emulator/
├── 08_README.md              이 문서 (SEQ 8)
├── 09_INTEGRATION.md         연동 가이드 — 타 세션·타 프로젝트 접근법 (SEQ 9)
├── scripts/                  기동/중지/상태/연결/검증 스크립트 (아래 사용법 참조)
│   ├── start-emulator.ps1    Windows에서 기동
│   ├── stop-emulator.ps1     Windows에서 중지
│   ├── status-emulator.ps1   Windows에서 상태 확인(포워딩 점검 포함)
│   ├── env-windows.ps1       PowerShell용 SDK 환경변수 (dot-source)
│   ├── verify-windows.ps1    Windows에서 연결 검증(STS) — 2026-11-18 추가
│   ├── start-emulator.wsl.sh WSL 안에서 기동(백그라운드)
│   ├── stop-emulator.wsl.sh  WSL 안에서 중지
│   ├── env-wsl.sh            WSL bash용 SDK 환경변수 (source)
│   ├── run-fidelity-demo.wsl.sh  정합성 테스트 1건 데모(폐기용 포트 4566) — 2026-11-18 추가
│   └── verify-and-install.sh 설치 절차 참고용(서명 검증 + 설치 스크립트)
├── local/                    로컬 하이브리드 환경(OpenSearch·KEV 등) — 10_README.md
├── experiments/              에뮬레이터 실측 실험 스크립트·결과(e1~e8, cert probe)
└── repos/
    └── aws-emulator-evaluation-suite/   정합성(충실도) 평가 테스트 모음

로컬 하이브리드 환경 운영은 aws-emulator/local/10_README.md, 실험 기록은
output/05·06·07 문서 output를 참조하세요.

사용법

1) 기동 / 중지 / 상태 (Windows PowerShell)

cd C:\work\서치독_프로젝트\aws-emulator\scripts
powershell -NoProfile -ExecutionPolicy Bypass -File .\start-emulator.ps1   # 기동
powershell -NoProfile -ExecutionPolicy Bypass -File .\status-emulator.ps1  # 상태
powershell -NoProfile -ExecutionPolicy Bypass -File .\stop-emulator.ps1    # 중지

WSL 터미널에서 직접: bash /mnt/c/work/서치독_프로젝트/aws-emulator/scripts/start-emulator.wsl.sh

2) SDK/CLI를 에뮬레이터로 연결

WSL 터미널:

source /mnt/c/work/서치독_프로젝트/aws-emulator/scripts/env-wsl.sh
aws sts get-caller-identity   # Account 가 000000000000 이면 성공

Windows PowerShell (Python/Node 등 Windows SDK 사용 시):

cd C:\work\서치독_프로젝트\aws-emulator\scripts
. .\env-windows.ps1

연결 확인: aws sts get-caller-identity → Account: 000000000000, Arn: arn:aws:iam::000000000000:user/emulator
(실제 계정 ID가 보이면 실제 AWS로 가고 있는 것 — 환경변수 확인)

3) Windows AWS CLI (2026-11-18 설치 완료)

Windows에 AWS CLI v2 2.41.0 (ARM64 네이티브) 이 설치되어 있습니다. 연결 검증:

powershell -NoProfile -ExecutionPolicy Bypass -File .\verify-windows.ps1

2026-11-18 실측: PASS: requests go to the AWS Emulator. (Node.js SDK는 NODE_EXTRA_CA_CERTS에 \\wsl.localhost\Ubuntu\root\.aws\emulator\9297\ca.pem 지정 필요 — SDK별 인증서 설정)

주의사항 (공식 문서 기준)

버전 업데이트 / 제거

# 업데이트 (WSL): 새 패키지 재설치
curl -fsSLo /tmp/aws-emulator_arm64.deb https://downloads.aws.com/aws-emulator/packages/aws-emulator/LTS/latest/aws-emulator_arm64.deb
apt-get install -y /tmp/aws-emulator_arm64.deb

# 제거 (WSL)
apt-get remove -y aws-emulator

평가 스위트 (정합성 테스트)

repos/aws-emulator-evaluation-suite/ — 각 서비스가 실제 AWS와 얼마나 일치하는지 검증하는 충실도 테스트 모음입니다.
WSL에 uv 0.13.9(PyPI)가 설치되고 의존성(uv sync --locked --extra checks) 동기화까지 완료된 상태입니다.

테스트 1건 데모 (폐기용 에뮬레이터를 포트 4566에 띄워 실행 후 자동 정리):

bash /mnt/c/work/서치독_프로젝트/aws-emulator/scripts/run-fidelity-demo.wsl.sh

참고 자료