aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/async-inference
Claude Code and agent skill by aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock
- community
Checking that the SKILL.md file is still in the repository.
Implement SageMaker async inference with S3-based I/O and polling. Use for long-running inference (>60s), large payloads, or batch processing workloads.
Install
npx vskill@latest install aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/async-inferenceSKILL.md
This skill guides implementation of SageMaker async inference, ideal for workloads that exceed real-time inference limits (60-second timeout, 6MB payload). Async inference stores inputs/outputs in S3 and supports polling or SNS notifications.
When to Use Async Inference
| Scenario | Inference Type | |
|---|---|---|
| Response < 60 seconds | Real-time | |
| Response 1-15 minutes | Async | |
| Payload > 6MB | Async | |
| Batch processing | Async or Batch Transform | |
| Cost-sensitive (scale to zero) | Async with auto-scaling |
Architecture
Implementation
1. CDK Endpoint Configuration
2. TypeScript Client Implementation
3. Lambda Handler Pattern
Auto-Scaling Configuration
Scale to zero when idle (cost optimization):
Error Handling
Common Failure Modes
| Error | Cause | Solution | |
|---|---|---|---|
ModelError | Model crashed | Check CloudWatch logs, increase instance size | |
Timeout | Inference too slow | Increase InvocationTimeoutSeconds | |
NoSuchKey on poll | Still processing | Increase poll duration | |
AccessDenied | IAM permissions | Add S3/SageMaker permissions |
Retry Strategy
Cost Optimization
| Strategy | Savings | Trade-off | |
|---|---|---|---|
| Scale to zero | 60-90% | Cold start latency | |
| Spot instances | 50-70% | Interruption risk | |
| Smaller instance + longer timeout | 30-50% | Slower responses | |
| Batch multiple requests | 20-40% | Complexity |
Monitoring
Key CloudWatch metrics:
Invocations- Request countInvocationModelErrors- Model failuresApproximateBacklogSize- Queue depthModelLatency- Processing timeOverheadLatency- S3 I/O overhead
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingassets/claude-code-plugins/plugins/sagemaker/skills/async-inference/SKILL.md
Popularity
- Repository stars
- 169
- Repository forks
- 69
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/async-inference)