AWS SDK for JavaScript (S3)
Official AWS SDK for uploading, downloading and managing S3 objects.
3. Used by agents' projects
Dependency in 198 public GitHub projects set up for AI coding agents that we scanned (3.2%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
docs.aws.amazon.com/llms.txtFrom the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What AWS SDK for JavaScript (S3) does
The AWS SDK for JavaScript v3 splits each service, and even the SDK core, into its own package. It drops v2's global config and runs every call through a middleware stack you can add to.
AWS SDK for JavaScript (S3) popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How AWS SDK for JavaScript (S3) is used
- AWS SDK for JavaScript (S3) is a dependency in 198 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (4.1% of the 4,867 JavaScript/TypeScript ones), #3 of 287 in sdks for hosted services.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 542; those are left out of every share on this page.
- The most used alternative in our scan is Supabase JS (675 projects).
- Projects that use it most often also use tsx (57.1%), Zod (69.2%), dotenv (51.5%).
- It is more common in projects set up for Kiro (9.3%) than for GitHub Copilot (2.6%).
By coding agent
Often used with
AWS SDK for JavaScript (S3) in practice
Strengths
Beyond one package per service, the maintainers split the SDK's core parts so a client pulls in only what it needs. Their example: a service that responds in JSON no longer needs an XML parser as a dependency.
v2 let you modify requests by attaching event listeners. v3 uses a middleware stack, and the README shows adding one that logs each command's input and output. The maintainers write that this makes debugging easier, since you can see which middleware ran before an error.
In v2, settings were merged into a copy of <code>AWS.config</code>, and <code>AWS.config.update</code> only affected clients created after the call. The maintainers call this "a frequent source of confusion". In v3 you pass configuration to each client. You can still share one config object across clients.
The Lambda section of the README says v3 performance on Node 18 improved over v2. It links an AWS benchmarking post about Lambda cold start times.
Watch out for
You can import the client by service name and call operations directly on it. The README says that if you use tree shaking, this increases bundle size compared with the modular Client plus Command interface.
You must add and import <code>react-native-get-random-values</code>, <code>react-native-url-polyfill</code> and <code>web-streams-polyfill</code>. You also need to enable Package Exports Support in the Metro bundler.
The SDK that comes with the Lambda runtime is set to a specific minor version, not the latest. The maintainers write that they "recommend that you always include the SDK modules your code uses" in the deployment package or a Lambda layer.
Client + Command call (README getting-started, shown with DynamoDB)
const { DynamoDBClient, ListTablesCommand } = require("@aws-sdk/client-dynamodb");
(async () => {
const client = new DynamoDBClient({ region: "us-west-2" });
const command = new ListTablesCommand({});
try {
const results = await client.send(command);
console.log(results.TableNames.join("\n"));
} catch (err) {
console.error(err);
}
})();More about AWS SDK for JavaScript (S3)
Packages around it
- @aws-sdk/s3-request-presigner: Presigned S3 URLs
- @aws-sdk/credential-providers: AWS credential loaders
- @aws-sdk/client-bedrock-runtime: Bedrock model client
- @aws-sdk/client-dynamodb: DynamoDB client
- @aws-sdk/lib-dynamodb: DynamoDB document client
- @aws-sdk/client-lambda: Lambda client
More in SDKs for hosted services
Alternatives
AWS SDK for JavaScript (S3) This page
Isomorphic JavaScript SDK for Supabase backend-as-a-service.
Google's platform SDK for realtime database, auth, hosting and serverless functions.
Vercel client library for storing and retrieving files in serverless environments.
Get started
Install it.
npm install @aws-sdk/client-s3Rules for your agent
## AWS SDK for JavaScript v3
- Install only the per-service client packages the code calls (the README's example adds `@aws-sdk/client-dynamodb`).
- Use the modular Client + Command style: `new XClient({...})`, then `client.send(new SomeCommand({...}))`. The non-modular interface increases bundle size when tree shaking.
- Pass configuration such as `region` to each client you create. v3 has no global configuration.
- In Lambda, create a single client per service, per region, outside the handler. Make the API calls inside the handler.
- In Lambda, include the SDK modules the code uses in the deployment package or a Lambda layer. Do not rely on the runtime-provided SDK.
- Commit the lock file with the code to avoid potential breaking changes.
- On react-native, import `react-native-get-random-values`, `react-native-url-polyfill/auto` and `web-streams-polyfill/dist/polyfill` before the SDK client, and enable Package Exports Support in Metro.