AI/ML 인프라 on AWS: 프로덕션 준비 청사진
발행: (2026년 4월 20일 AM 09:21 GMT+9)
3 분 소요
원문: Dev.to
Source: Dev.to
고처리량 학습 데이터 스토리지
# Create FSx for Lustre linked to S3 training data
aws fsx create-file-system \
--file-system-type LUSTRE \
--storage-capacity 1200 \
--lustre-configuration ImportPath=s3://training-data-bucket
FSx for Lustre는 100 GB/s 이상의 처리량을 제공하며, S3의 약 5 GB/s에 비해 훨씬 빠릅니다. S3에서 8시간이 걸리던 작업이 Lustre에서는 약 45분 안에 완료될 수 있습니다.
Karpenter를 이용한 GPU 노드 프로비저닝
apiVersion: karpenter.sh/v1alpha5
kind: Provisioner
metadata:
name: gpu-training
spec:
requirements:
- key: node.kubernetes.io/instance-type
operator: In
values: ["p4d.24xlarge", "p3.8xlarge", "g5.12xlarge"]
- key: karpenter.sh/capacity-type
operator: In
values: ["spot", "on-demand"]
limits:
resources:
nvidia.com/gpu: 32
- Spot GPU 인스턴스를 사용하면 비용을 60 ~ 70 % 절감할 수 있습니다.
- Karpenter는 워크로드에 맞는 적절한 GPU 유형을 자동으로 프로비저닝합니다.
자동 스케일링이 적용된 SageMaker 모델 배포
import sagemaker
from sagemaker.model import ModelPackage
model_package = ModelPackage(
model_package_arn="arn:aws:sagemaker:us-east-1:123456:model-package/my-model/1",
role=sagemaker_role,
sagemaker_session=session
)
# Deploy with auto‑scaling
predictor = model_package.deploy(
initial_instance_count=2,
instance_type="ml.g5.xlarge",
endpoint_name="production-inference"
)
단일 엔드포인트에 다중 모델 호스팅
from sagemaker.multidatamodel import MultiDataModel
mme = MultiDataModel(
name="multi-model-endpoint",
model_data_prefix=f"s3://{bucket}/models/",
model=model,
sagemaker_session=session
)
10개 이상의 모델을 하나의 엔드포인트에서 실행하면 추론 비용을 크게 절감할 수 있습니다.
데이터 및 모델 드리프트 모니터링
from sagemaker.model_monitor import DataCaptureConfig
data_capture = DataCaptureConfig(
enable_capture=True,
sampling_percentage=20,
destination_s3_uri=f"s3://{bucket}/capture"
)
데이터 캡처를 활성화하면 다음을 모니터링할 수 있습니다:
- 데이터 드리프트
- 모델 드리프트
- 특성 중요도 변화
추가 리소스
- AI/ML 툴킷 – 40개 이상의 Terraform 모듈, 파이프라인 템플릿, 배포 청사진: AI/ML Toolkits
- 아키텍처 청사진 – 프로덕션 수준 ML 아키텍처 패턴: Architecture Blueprints
- 무료 AI/ML 강좌 – 비용 없이 기본을 학습하세요: Free Courses
당신의 ML 인프라 스택은 무엇인가요?