AWS Sdk Js V3 Usage
AWS SDK for JavaScript v3 development patterns.
Install
npx skills add aws/agent-toolkit-for-aws --skill aws-sdk-js-v3-usage -g -a claude-code -y- Repository
- aws/agent-toolkit-for-aws3.4k
- Category
- DevOps
- Updated
- 5d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 2,088 tokens
- Runs scripts
- No, instructions only
What it does
AWS SDK for JavaScript v3 development patterns. Use when writing JavaScript or TypeScript code that uses AWS services via @aws-sdk/* packages (aws-sdk-js-v3), or when asked about schemas, runtime validation, serialization, or code generation in the context of the JS/TS AWS SDK.
Do not use emojis in any code, comments, or output when this skill is active.
AWS SDK for JavaScript v3
Package Structure
@aws-sdk/client-*, one per service, generated by smithy-typescript; one-to-one with AWS services and operations@aws-sdk/lib-*, higher-level helpers (e.g.lib-dynamodb,lib-storage)@aws-sdk/*(no prefix), utility packages (mostly internal; don't import deep paths)
Always import from the package root:
import { S3Client } from "@aws-sdk/client-s3"; // correct
// NOT: import { S3Client } from "@aws-sdk/client-s3/dist-cjs/S3Client"
Two Client Styles
Bare-bones (preferred, smaller bundle):
import { S3Client, GetObjectCommand } from "@aws-sdk/client-s3";
const client = new S3Client({ region: "us-east-1" });
const output = await client.send(new GetObjectCommand({ Bucket: "b", Key: "k" }));
Aggregated (v2-style but NOT v2, larger bundle):
import { S3 } from "@aws-sdk/client-s3";
const client = new S3({ region: "us-east-1" });
const output = await client.getObject({ Bucket: "b", Key: "k" });
Client Configuration
No global config in v3, pass config to each client. region is always required; set it explicitly or via AWS_REGION env var.
const config = { region: "us-east-1", maxAttempts: 5 };
const s3 = new S3Client(config);
const dynamo = new DynamoDBClient(config);
Do not read or mutate client.config after instantiation, it is a resolved form (e.g. region becomes an async function). See references/effective-practices.md.
For HTTP handler (NodeHttpHandler from @smithy/node-http-handler), retry strategy, endpoint details, logging, FIPS, dual-stack, protocol selection, and S3-specific options → see references/clients.md.
Credentials
All providers from @aws-sdk/credential-providers. Credentials are lazy and cached per client until ~5 min before expiry.

