aws-sdk-v2-to-v3-migration
Use when the codebase still imports from 'aws-sdk' v2, uses new AWS.*() constructors, .promise() calls, AWS.config.update(), DocumentClient, or s3.upload() —…
Skill by matt-riley
Chalk Labs
Need help deploying aws-sdk-v2-to-v3-migration?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/matt-riley-aws-sdk-v2-to-v3-migration
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: cloud
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/aws-sdk-v2-to-v3-migration
What's inside
- Skill name
aws-sdk-v2-to-v3-migration- Description
- Use when the codebase still imports from 'aws-sdk' v2, uses new AWS.*() constructors, .promise() calls, AWS.config.update(), DocumentClient, or s3.upload() — and needs a safe modular v3 migration without changing runtime behavior.
- License
- GPL-3.0
- Metadata
- kind: task · version: 1.0.0 · audience: general-coding-agent · category: migrations · maturity: draft
- Instructions
- 97 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- service-mappings.md · references/
- testing-mocks.md · references/
SKILL.md (first lines)
# AWS SDK v2 to v3 migration
## Use this skill when
- The codebase still imports `aws-sdk` v2 clients or constructs them with `new AWS.*`.
- You see v2 patterns like `.promise()`, `AWS.config.update(...)`, `DocumentClient`, or `s3.upload(...)`.
- You need to move a service surface to the modular v3 packages without changing runtime behavior.
- The work includes updating tests, mocks, helpers, or wrappers tied to v2 client behavior.
## Do not use this skill when
- The codebase already uses `@aws-sdk/client-*` packages — it is already on v3.
- The task is about AWS infrastructure or CDK, not SDK client calls.
## Inputs to gather
**Required before editing**
- Which services are in use (S3, DynamoDB, SQS, STS, etc.).
- The module system in use (ESM, CJS) and whether TypeScript is involved.
**Helpful if present**
- Existing config sources for region, credentials, endpoints, retries, and timeouts.
- Custom wrappers, pagination helpers, stream handling, or document marshalling logic.
**Only investigate if encountered**
- Non-standard credential chain or custom endpoint configuration.
## First move
Inventory the v2 imports and service constructors before editing any files:
```sh
grep -r "require('aws-sdk')\|from 'aws-sdk'" --include="*.ts" --include="*.js" -l
grep -r "new AWS\." --include="*.ts" --include="*.js" -l
```
List the services found, then start with the smallest self-contained service surface.
Consult [`references/service-mappings.md`](references/service-mappings.md) for the
correct v3 package names and API shapes before writing any code.
## Workflow
1. Inventory all `aws-sdk` v2 imports and the services in use.
2. Group changes by service so imports and call sites stay coherent.
3. Pick the smallest self-contained service as the pilot and complete steps 4-9 for that service before widening to the next one.
4. Map each v2 client, helper, and API call to the v3 equivalent using the service mappings reference.
5. Install the required `@aws-sdk/client-<service>` packages (and any utility packages such as `@aws-sdk/lib-storage`).
6. Replace `new AWS.Service()` with the corresponding v3 client and explicit configuration.
7. Replace method calls with `client.send(new Command(...))`, preserving input shapes and response handling.
8. Update helpers, mocks, and tests to fit the v3 client-and-command model using the testing mocks reference.
9. Validate pagination, streaming, document marshalling, retries, and error handling where used.
## Outputs
- Migrated code using v3 clients/commands (no v2 .promise() or DocumentClient patterns left in changed paths).
- Tests or manual verification that the new shape works equivalently.
## Guardrails
- **Must** preserve region, credentials, endpoint, and retry configuration explicitly.
- **Must** not mix v2 and v3 patterns in the same migrated surface unless a staged migration plan exists.
- **Should** prefer incremental service-by-service migrations when the surface area is large.
- **Should** not replace typed wrappers with `unknown` or `any` shortcuts just to clear type errors.
## Validation
- Run the existing tests or targeted checks that cover the migrated services.
- Confirm no imports still pull from the v2 `aws-sdk` package on the migrated surface.
- Spot-check real behavior for pagination, streams, uploads, marshalling, and expected error types.
- Smoke test:
- should trigger: "Replace new AWS.S3() and .promise() calls with AWS SDK v3."
- should not trigger: "Change our Terraform S3 module to add versioning." (→ `terraform-skill`)
## Examples
- "Migrate a Lambda that does `const s3 = new AWS.S3()` and `s3.upload(...)` to `S3Client` plus `Upload` from `@aws-sdk/lib-storage`, then update the mocks."
- "Convert our DynamoDB document helper to AWS SDK v3 and keep the existing pagination and marshalling behavior."
- "I upgraded `aws-sdk` and now `new AWS.SQS()` is everywhere — help me finish the v3 migration safely."
- ```ts
// v2
const s3 = new AWS.S3({ region: 'us-east-1' });
await s3.upload({ Bucket, Key, Body }).promise();
// v3
import { S3Client } from '@aws-sdk/client-s3';
import { Upload } from '@aws-sdk/lib-storage';
const s3 = new S3Client({ region: 'us-east-1' });
await new Upload({ client: s3, params: { Bucket, Key, Body } }).done();
```
## Reference files
- [`references/service-mappings.md`](references/service-mappings.md) — v2→v3 package names, client construction, API call patterns, pagination, DynamoDB DocumentClient, streaming, and error handling.
- [`references/testing-mocks.md`](references/testing-mocks.md) — replacing v2 mock patterns with `@aws-sdk/client-mock`, `jest.spyOn`, or dependency injection.From matt-riley/agent-skills, GPL-3.0.
More from matt-riley/agent-skills
- 0.614score
code-intelligence
matt-riley
Use when navigating or refactoring code — choosing between LSP, rg, or semantic search tools; an LSP call returns empty and you need to know if it failed; or…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
code-tour
matt-riley
Use when asked to create a .tour walkthrough — onboarding, PR review, RCA, architecture, or any persona-targeted step-by-step code narrative.
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agent-governance
matt-riley
Use this skill when building AI agents that call external tools, implementing policy-based access controls, adding semantic intent classification, creating…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agentic-eval
matt-riley
Use when designing or implementing an evaluation loop for AI agent outputs — reflection loops, evaluator-optimizer pipelines, LLM-as-judge scoring, or…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
api-smoke-validation
matt-riley
Use when running quick, repeatable API smoke tests after changes with hurl, including auth, status-code, response-shape, endpoint sanity, and pre-integration…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
circleci-to-github-actions-migration
matt-riley
Use when a repository still depends on .circleci/config.yml jobs, workflows, or artifacts that need to be replaced or phased out with GitHub Actions —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
mocha-to-jest-migration
matt-riley
Use when a JavaScript or TypeScript suite still depends on Mocha, Chai, or Sinon and needs an incremental Jest migration.
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
project-references-migration
matt-riley
Use when a layered TypeScript workspace needs an incremental project-references migration without breaking package boundaries or editor resolution.
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
ast-grep
matt-riley
Use when you need ast-grep structural search, linting, or safe codemod rewrites, especially for requests that mention ast-grep, sg, codemod, rule files, or…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agent-instructions
matt-riley
Use when creating or updating agent instruction files (AGENTS.md for Pi, copilot-instructions.md for Copilot, per-path guides, or AGENTS.md router) —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
autoresearch
matt-riley
Use when running autonomous iterative experiments to optimize a measurable metric on an existing codebase — not for writing tests or diagnosing a specific…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
aws-lambda-go-deployment
matt-riley
Use when deploying or debugging Go-based AWS Lambda packaging, bootstrap, runtime, or handler issues — not when the main failure is SAM stack wiring, IAM OIDC…
SkillAFreshness: A★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Jun 28, 2026 (4 months ago)
- Last release
- Oct 23, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.0
- License
- GPL-3.0
- Repository
- github.com/matt-riley/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from matt-riley
- 0.614score
agent-instructions
matt-riley
Use when creating or updating agent instruction files (AGENTS.md for Pi, copilot-instructions.md for Copilot, per-path guides, or AGENTS.md router) —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agent-supply-chain
matt-riley
Use this skill when generating SHA-256 integrity manifests for agent plugins, verifying that installed plugins match their manifests, detecting tampered…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agentic-eval
matt-riley
Use when designing or implementing an evaluation loop for AI agent outputs — reflection loops, evaluator-optimizer pipelines, LLM-as-judge scoring, or…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
api-smoke-validation
matt-riley
Use when running quick, repeatable API smoke tests after changes with hurl, including auth, status-code, response-shape, endpoint sanity, and pre-integration…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
circleci-to-github-actions-migration
matt-riley
Use when a repository still depends on .circleci/config.yml jobs, workflows, or artifacts that need to be replaced or phased out with GitHub Actions —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agent-governance
matt-riley
Use this skill when building AI agents that call external tools, implementing policy-based access controls, adding semantic intent classification, creating…
SkillAFreshness: A★ 4Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get aws-sdk-v2-to-v3-migration running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
aws-sdk-v2-to-v3-migration skill. Agent Mart. https://agentmart.dev/skills/matt-riley-aws-sdk-v2-to-v3-migration (last updated 2026-10-24)