Package structure
V3 ships one package per service. Replace the monolithicaws-sdk package with the specific client package you need.
Import changes
No global AWS.config
In v2, all clients merged their configuration with AWS.config — a global singleton. V3 removes global configuration entirely. Pass config directly to each client constructor.
API style: callbacks → promises
V2 operations use Node.js-style callbacks by default, with.promise() for promise-based calls. V3 operations always return promises.
Sending commands
V3 separates the client from the operation. Operations areCommand objects passed to client.send().
Configuration option changes
httpOptions → requestHandler
The httpOptions bucket from v2 is replaced by a requestHandler constructor option.
httpOptions fields:
| v2 field | v3 equivalent |
|---|---|
connectTimeout | requestHandler.connectionTimeout |
timeout | requestHandler.requestTimeout |
agent | requestHandler.httpsAgent |
proxy | Configure via a proxy agent |
xhrAsync | Deprecated — requests are always async |
xhrWithCredentials | requestHandler.credentials (FetchHttpHandler) |
maxRetries → maxAttempts
sslEnabled → tls
s3ForcePathStyle → forcePathStyle
Deprecated options (always on in v3)
These v2 options no longer need to be set — the behavior is always enabled in v3:| v2 option | v3 status |
|---|---|
correctClockSkew | Deprecated — clock skew correction is always applied |
hostPrefixEnabled | Deprecated — host prefix injection is always on |
signatureCache | Deprecated — signing keys are always cached |
maxRedirects | Deprecated — redirects are not followed (S3 uses followRegionRedirects) |
paramValidation | Deprecated — no client-side runtime validation |
convertResponseTypes | Deprecated — not type-safe; use TypeScript types instead |
Error handling
Error metadata has moved from top-level fields to subfields.Middleware replaces event listeners
V2 lets you modify requests by attaching event listeners. V3 uses a middleware stack.initialize, serialize, build, finalizeRequest, and deserialize. Each middleware calls the next one in the chain, making the execution order explicit and debuggable.
S3 multipart upload
@aws-sdk/lib-storage separately: npm install @aws-sdk/lib-storage.
Credential providers
@aws-sdk/credential-providers package.