aws-sdk-js-v3-usage

Implements AWS SDK for JavaScript v3 patterns for clients, credentials, streams, and error handling.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill aws-sdk-js-v3-usage-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-sdk-js-v3-usage
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/aws-sdk-js-v3-usage
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill aws-sdk-js-v3-usage-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct code against the AWS SDK for JavaScript v3 requires knowing its modular package structure, credential provider chain, streaming behavior, and service-specific patterns, which differ significantly from SDK v2 and are easy to get wrong. ## Core Features & Use Cases - Client and Credential Configuration: Set up bare-bones or aggregated clients, configure regions, retries, HTTP handlers, and choose from the full set of credential providers including STS AssumeRole, SSO, and Cognito. - Service-Specific Patterns: Work with DynamoDB DocumentClient marshalling, S3 presigned URLs, multipart uploads, waiters, paginators, and SigV4a for Multi-Region Access Points. - Operational Guidance: Handle streaming responses without socket exhaustion, structure error handling with $metadata, apply middleware, and follow Lambda best practices. - Use Case: When building a Node.js backend that uploads files to S3 and writes metadata to DynamoDB, use this Skill to generate correct client setup, multipart upload logic, and DocumentClient code with proper error handling. ## Quick Start Write a TypeScript function that uses the AWS SDK v3 to upload a stream to S3 with a multipart upload and handle errors correctly.

Frequently Asked Questions about aws-sdk-js-v3-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use the AWS SDK for JavaScript v3 with S3?

Import S3Client and command classes from @aws-sdk/client-s3, instantiate the client with a region, and call client.send with commands like GetObjectCommand. Always read or discard streaming response bodies to avoid socket exhaustion.

How do I assume an IAM role with aws-sdk-js-v3?

Use fromTemporaryCredentials from @aws-sdk/credential-providers with the RoleArn in params, then pass it as the credentials option to your client. Chained role assumption is supported via the masterCredentials option.

What is the difference between bare-bones and aggregated clients in AWS SDK v3?

Bare-bones clients use client.send with command objects and produce smaller bundles, while aggregated clients like S3 offer v2-style methods such as getObject at the cost of a larger bundle. Bare-bones is the preferred style.

Does AWS SDK v3 support DynamoDB with native JavaScript types?

Yes, @aws-sdk/lib-dynamodb provides DynamoDBDocumentClient, which automatically marshals native JS types like strings, numbers, and objects to DynamoDB AttributeValues. It supports marshall options, NumberValue for large numbers, and paginators.

Why do I get socket exhaustion warnings with aws-sdk-js-v3?

Socket exhaustion happens when streaming response bodies are left unread, keeping sockets open, or when maxSockets is too low for parallel workloads. Always read, pipe, or destroy response streams and configure maxSockets to match your batch size.

Which Node.js version does AWS SDK for JavaScript v3 require?

SDK version 3.968.0 and later requires Node.js 20 or higher, while version 3.723.0 and later requires Node.js 18 or higher. Earlier versions support older Node.js releases.