API Reference

@aws-sdk/client-s3

AWS SDK for JavaScript v3 S3 client with modular commands, streaming, and presigned URL support.

Official Documentation ↗
CompatibilityThis documentation covers version v3. Check the official docs for the latest API surface.

Installation

npmnpm install @aws-sdk/client-s3

Methods

The v3 S3 client sends explicit command objects and supports tree-shaking through modular packages.

Key Features

  • Command-per-operation modular design
  • Streaming uploads and downloads
  • Presigned URL generation

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

Errors

The official API reference declares the following error types:

API reference evidence

Fetched from official sources on 2026-11-08T19:20:00+08:00 via WebFetch https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/(该落地页为 JS 渲染,仅返回导航壳);WebFetch https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Class/S3Client;WebFetch https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutObjectCommand;WebFetch https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectCommand.

FAQ

Why is my bundle so large?
Import only the command classes you need; the v3 SDK is designed for tree-shaking, but importing the whole service defeats it.
How do credentials resolve?
The default provider chain checks environment variables, shared config files, and IAM roles, so running on EC2 or Lambda needs no explicit keys.
How do I generate a presigned URL?
Use getSignedUrl from @aws-sdk/s3-request-presigner with a command and an expiresIn value.