레퍼런스
트러블슈팅 모음 — 실제 오류 15가지
배포 과정에서 실제로 마주치는 오류와 검증된 해결책
범례: BE 백엔드/Lambda FE 프론트엔드/Next.js IAM 권한 CF CloudFront/S3 AZ Azure AD
ImportError cryptography
No space left
Function already exists
500 캐싱
SSL 오류
CORS preflight
CORS 실제 요청
AADSTS50011
interaction_in_progress
5-part JWT
audience 실패
window is not defined
React 19 빌드
CloudFront 304
AccessDeniedException
1
Lambda에서 cryptography ImportError
BE
Runtime.ImportModuleError: No module named 'cryptography'
# zappa_settings.json
"use_precompiled_packages": true,
"manylinux": true
2
Lambda /tmp 디스크 가득 참
BE
OSError: [Errno 28] No space left on device
3
zappa deploy 시 "Function already exists"
BE
botocore.exceptions.ClientError: Function already exists: gsr-my-project
4
API Gateway가 500 에러를 계속 반환 (캐싱)
BE
HTTP 500 — 코드 수정 후에도 동일한 500이 반복됨
5
SSL 인증서 검증 실패 (사내망)
BE
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
6
CORS preflight(OPTIONS) 실패
BE
Access to fetch blocked by CORS policy: Response to preflight has invalid HTTP status code 403
7
CORS 실제 요청(POST) 실패
BE
Access to fetch blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present
CORS(app, resources={r"/api/*": {
"origins": ["https://xxxx.cloudfront.net", "http://localhost:3000"],
"methods": ["GET", "POST", "OPTIONS"],
"allow_headers": ["Authorization", "Content-Type"],
}})
8
AADSTS50011 — 리다이렉트 URI 불일치
AZ
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application
9
interaction_in_progress — MSAL 상태 충돌
AZ
BrowserAuthError: interaction_in_progress: Interaction is currently in progress
// 브라우저 콘솔에서 실행
Object.keys(sessionStorage)
.filter(k => k.includes('interaction.status'))
.forEach(k => sessionStorage.removeItem(k))
// 또는 전체 세션 초기화
sessionStorage.clear()
10
5-part JWT 파싱 오류
BE
jwt.exceptions.DecodeError: Not enough segments (expected 3, got 5)
11
JWT audience 검증 실패
BE
jwt.exceptions.InvalidAudienceError: Invalid audience
12
window is not defined — MSAL SSR 오류
FE
ReferenceError: window is not defined (during pnpm build)
13
React 19 빌드 실패
FE
Error: useLayoutEffect does not work on the server. Consider using useEffect instead. (fatal in output: 'export' mode)
# package.json
"pnpm": {
"overrides": {
"react": "18.3.1",
"react-dom": "18.3.1"
}
}
14
CloudFront에서 이전 버전 HTML 계속 서빙
CF
S3 업로드 후에도 CloudFront에서 구버전 HTML이 나타남
aws cloudfront create-invalidation \
--distribution-id E1234567890 \
--paths "/*" \
--profile gsr-dev
15
Lambda에서 DynamoDB AccessDeniedException
IAM
botocore.exceptions.ClientError: AccessDeniedException: User: arn:aws:sts::...assumed-role/... is not authorized to perform: dynamodb:PutItem
# 빠른 진단: Lambda 역할의 현재 정책 확인
aws iam list-attached-role-policies \
--role-name gsr-lambda-role \
--profile gsr-dev
aws iam get-role-policy \
--role-name gsr-lambda-role \
--policy-name InlinePolicy \
--profile gsr-dev
✅ 15가지 오류를 모두 다뤘습니다. 여기에 없는 오류는 CloudWatch Logs (Lambda 콘솔 → 모니터링 → 로그 보기)와 브라우저 콘솔을 먼저 확인하세요. 에러 메시지 전문을 gsr-sso-sample 레포 Issues에 남겨주시면 가이드를 업데이트하겠습니다.