serverless-architecture

A guide for designing and implementing serverless functions—small programs run by a cloud provider in response to events, without managing servers directly.

In plain words
What is it for?
Use it to design Lambda-style systems, select event sources and runtimes, configure least-privilege access, plan observability, and estimate costs.
Why use it?
It helps choose clear function boundaries, suitable runtimes, secure permissions, monitoring, and a sensible balance between speed and cost.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/soulcodex/agentic/serverless-architecture
Any agent
npx skills add soulcodex/agentic --skill serverless-architecture
Clone the repo
git clone --depth 1 https://github.com/soulcodex/agentic

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,177 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.01177
Opus 5 $0.00031 $0.00589
Sonnet 5 $0.00012 $0.00235
Haiku 4.5 $0.00006 $0.00118

Measured 2d ago against content hash 059df60bcd89, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

serverless-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/backend/serverless-architecture/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Serverless Architecture Skill

Step 1 — Function Boundary Design

A Lambda function (or equivalent) should do exactly one thing. Design boundaries by:

  • Event source: each distinct trigger gets its own function.
  • Single responsibility: one function = one business operation.
  • Avoid chaining: do not call one Lambda synchronously from another — use queues.
Bad:  process-order Lambda → calls fulfillment Lambda → calls notification Lambda
Good: process-order Lambda → SQS → fulfillment Lambda → SQS → notification Lambda

Step 2 — Runtime and Cold-Start

Runtime Cold-start Notes
Go / Rust Very fast (~10 ms) Best for latency-sensitive workloads
Node.js (ESM) Fast (~100–200 ms) Keep bundle small; avoid large deps
Python Medium (~200–500 ms) Use Lambda layers for heavy deps
JVM (Java/Kotlin) Slow (1–5 s) Use GraalVM native image or SnapStart

Mitigate cold starts for latency-critical functions:

# serverless.yml or SAM template
Properties:
  ProvisionedConcurrencyConfig:
    ProvisionedConcurrentExecutions: 2  # keeps N instances warm

Use provisioned concurrency only where latency SLAs justify the cost.

Step 3 — Event Sources

Trigger Pattern Notes
API Gateway / ALB Synchronous HTTP Return response within 29 s
SQS Async batch processing Set visibility timeout > max duration
EventBridge Event-driven, fan-out Ideal for domain events
S3 File processing Trigger on ObjectCreated, filter by prefix
DynamoDB Streams Change data capture Process in order per partition key
Scheduled (EventBridge) Cron jobs Use for periodic maintenance tasks

Step 4 — IAM Least Privilege

Every function gets its own IAM execution role. Grant only what the function needs:

{
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["dynamodb:GetItem", "dynamodb:PutItem"],
      "Resource": "arn:aws:dynamodb:us-east-1:123456789:table/orders"
    },
    {
      "Effect": "Allow",
      "Action": ["sqs:SendMessage"],
      "Resource": "arn:aws:sqs:us-east-1:123456789:fulfillment-queue"
    }
  ]
}

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 135 lines · 62 tokens per session scan A 059df60bcd89

Subscribe to this mod's changes

serverless-architecture is a skill published in the GitHub repository soulcodex/agentic (10 stars, last pushed 2d ago), licensed MIT. It adds 62 tokens to every session and 1,177 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

aws-cloud-architecture

Comprehensive guide to AWS cloud architecture covering compute, storage, databases, networking, security, serverless, and cost optimization with production-ready patterns.

manutej/luxor-claude-marketplace · 33 tokens

survey-design

Design unbiased survey instruments — question wording, scales, and sampling — to measure attitudes at scale. Use when you need quantitative breadth. For behavioural experiments, use a-b-test-design (prototyping-testing).

Owl-Listener/designer-skills · 47 tokens

design-negotiation

Advocate for design quality, scope, and timeline with partners and leadership using evidence and shared goals. Use in the conversation itself. For the commercial vocabulary behind it, use business-design (ux-strategy).

Owl-Listener/designer-skills · 48 tokens

design-debt-audit

Inventory and prioritise accumulated design inconsistencies across a product. Use when drift has built up over time. For token coverage specifically use design-token-audit (designer-toolkit); for WCAG gaps use accessibility-audit (design-systems).

Owl-Listener/designer-skills · 59 tokens

design-impact-reporting

Communicate design's contribution to business and user outcomes in stakeholder language. Use when reporting results upward. For choosing the metrics in the first place, use metrics-definition (ux-strategy).

Owl-Listener/designer-skills · 44 tokens

design-system-governance

Define how the system evolves — contribution model, versioning, deprecation, and change management. Use when multiple teams contribute. For driving uptake use design-system-adoption (designer-toolkit); for design file history use version-control-strategy (design-ops).

Owl-Listener/designer-skills · 62 tokens