canirequire › Dual (CommonJS + ESM) › @aws-sdk/core
Is @aws-sdk/core ESM-only? Can you require() it?
Core functions & classes shared by multiple AWS SDK clients.
Last verified Sep 9, 2026 against @aws-sdk/core@3.977.9. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@aws-sdk/core publishes both a CommonJS entry and a native ESM entry (ESM added in 3.576.0). require("@aws-sdk/core") and import "@aws-sdk/core" both work on every supported Node.js version and in Bun.
Does @aws-sdk/core@3.977.9 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@aws-sdk/core") from a CommonJS file and import "@aws-sdk/core" from an ES module.
| Runtime | require("@aws-sdk/core") | import "@aws-sdk/core" |
|---|---|---|
| Node.js 18 | ✓ works | ✓ works |
| Node.js 20 | ✓ works | ✓ works |
| Node.js 22 | ✓ works | ✓ works |
| Node.js 24 | ✓ works | ✓ works |
| Node.js 26 | ✓ works | ✓ works |
| Bun 1.4 | ✓ works | ✓ works |
How to import @aws-sdk/core
ES modules (import)
import core from "@aws-sdk/core";CommonJS (require)
const core = require("@aws-sdk/core");Module format by version
Derived from the type, main and exports fields of every stable release on npm (230 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 3.973.13 – 3.977.9 | Dual (CommonJS + ESM) | Feb 24, 2026 |
Frequently asked
Is @aws-sdk/core ESM-only?
@aws-sdk/core@3.977.9 ships CommonJS and ESM builds. @aws-sdk/core publishes both a CommonJS entry and a native ESM entry (ESM added in 3.576.0). require("@aws-sdk/core") and import "@aws-sdk/core" both work on every supported Node.js version and in Bun.
Can I require @aws-sdk/core?
Yes. @aws-sdk/core ships a CommonJS entry, so require("@aws-sdk/core") works on every Node.js version, alongside the native ESM entry for import.
Does @aws-sdk/core work in Bun?
Yes. import "@aws-sdk/core" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @aws-sdk/core ship TypeScript types?
Yes. @aws-sdk/core bundles its own type declarations; no @types package is needed.
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
Similar popularity
- @vitest/snapshot 5.0.0ESM-only
- @aws-sdk/credential-provider-env 3.972.70CommonJS
- @sinonjs/fake-timers 15.4.0CommonJS
- @aws-sdk/credential-provider-web-identity 3.972.76CommonJS
- @swc/helpers 0.5.23Dual
- @aws-sdk/util-user-agent-node 3.973.60CommonJS
- @sinclair/typebox 0.34.52Dual
- @aws-sdk/middleware-user-agent 3.972.74CommonJS