com um clique
cost
// References Serverless OpenClaw cost optimization guidelines. Validates that no resources exceeding the cost target ($1/month) are created during implementation. Use when writing CDK stacks or making infrastructure changes.
// References Serverless OpenClaw cost optimization guidelines. Validates that no resources exceeding the cost target ($1/month) are created during implementation. Use when writing CDK stacks or making infrastructure changes.
References Serverless OpenClaw architecture. Covers network design, CDK stack structure, DynamoDB data model, API protocols, and container design.
References cold start optimization history and techniques. Covers Docker image optimization, Fargate CPU tuning, SOCI lazy loading, and Lambda Bedrock discovery fix. Use when optimizing startup performance.
Loads Serverless OpenClaw project context. Provides background knowledge needed for development including project overview, tech stack, architecture decisions, and data models.
Development workflow guide. Covers build, test, lint, format commands, package structure, Git hooks, TDD methodology, and coding conventions. Use when setting up dev environment, running tests, or following project conventions.
Guides Phase 1 MVP implementation steps. Pass a specific step number as an argument to get the goals, deliverables, validation criteria, and detailed design for that step.
Guides Phase 2 Lambda Container Migration steps. Pass a specific step number (2-1 through 2-5) to get the goals, deliverables, validation criteria, and detailed design for that step.
| name | cost |
| description | References Serverless OpenClaw cost optimization guidelines. Validates that no resources exceeding the cost target ($1/month) are created during implementation. Use when writing CDK stacks or making infrastructure changes. |
| allowed-tools | Read, Glob, Grep |
Per-service cost breakdown, before/after optimization comparison, checklist:
Verify the following resources are NOT created:
| Prohibited Resource | Monthly Cost | Alternative |
|---|---|---|
| NAT Gateway | ~$33 | Fargate Public IP |
| ALB/ELB | ~$18-25 | API Gateway |
| Interface Endpoint | ~$7/each | Public IP for public endpoint access |
| DynamoDB Provisioned | Variable | PAY_PER_REQUEST |
| Lambda in VPC | Requires NAT | Deploy outside VPC |
| Category | Target |
|---|---|
| Within Free Tier | ~$0.23/month |
| After Free Tier | ~$1.07/month |
| Maximum allowed | Under $10/month |
See cost-optimization.md §9 for full Lambda cost analysis.
| Resource | Cost Model | Notes |
|---|---|---|
| Lambda invocations | Per-request | 1M requests/month free tier |
| Lambda duration | Per GB-second | 400K GB-seconds/month free tier |
| Lambda container image | ECR storage | ~$0.10/GB/month after 500MB free |
| No Fargate idle cost | — | Lambda scales to zero automatically |
Key advantage: Lambda charges only for actual execution time — no idle Fargate cost when no users are active. For low-traffic usage, Lambda runtime cost approaches $0/month within free tier.