Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions guides/2_sagemaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,24 @@ Beyond what we've deployed, SageMaker offers:

While your endpoint is running, check its CloudWatch metrics:

**Mac:**
```bash
# View invocation metrics
aws cloudwatch get-metric-statistics --namespace "AWS/SageMaker" --metric-name "Invocations" --dimensions Name=EndpointName,Value=alex-embedding-endpoint --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) --period 300 --statistics Sum --region $(aws configure get region)
```

**Linux:**
```bash
# View invocation metrics
aws cloudwatch get-metric-statistics --namespace "AWS/SageMaker" --metric-name "Invocations" --dimensions Name=EndpointName,Value=alex-embedding-endpoint --start-time $(date -u -d '1 hour ago' +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) --period 300 --statistics Sum --region $(aws configure get region)
```

**Windows (PowerShell):**
```powershell
# View invocation metrics
aws cloudwatch get-metric-statistics --namespace "AWS/SageMaker" --metric-name "Invocations" --dimensions Name=EndpointName,Value=alex-embedding-endpoint --start-time (Get-Date).ToUniversalTime().AddHours(-1).ToString("yyyy-MM-ddTHH:mm:ss") --end-time (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") --period 300 --statistics Sum --region (aws configure get region)
```

This shows how SageMaker automatically tracks model usage - essential for MLOps!

## Troubleshooting
Expand Down