A lightweight wrapper around the native fetch API that automatically signs HTTP requests with AWS Signature Version 4 (SigV4) authentication. v4.4.1 is the latest stable release, actively maintained. Built on the official AWS SDK credential providers. Differentiates from alternatives by using the native `fetch` (no additional HTTP client), supporting both ESM and CommonJS, and working in Node.js >=18 and modern browsers. Credentials can be auto-resolved from environment in Node.js or provided explicitly for browser usage. Requires `@aws-sdk/credential-provider-node` (for Node.js), `@smithy/types`, and `@aws-sdk/credential-providers` as dependencies.
npm install aws-sigv4-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a signed fetch client for AWS Lambda function URL and makes a POST request.
Replace `import { createSignedFetch } from 'aws-sigv4-fetch'` with `import { createSignedFetcher } from 'aws-sigv4-fetch'`.If your service expects a different region, set `region` explicitly in options.
If you need polyfilled fetch (e.g., for older Node or specific proxy support), pass a custom `fetch` implementation.
Always provide explicit credentials when using in browser environments.
Use `import` syntax instead of `require` for better tree-shaking.
Pass credentials explicitly: `createSignedFetcher({ service, credentials: { accessKeyId: '...', secretAccessKey: '...' } })`.Use `const { createSignedFetcher } = require('aws-sigv4-fetch');` or switch to ESM import.Ensure `service` matches the AWS service you are calling (e.g., 'lambda' for Lambda, 'execute-api' for API Gateway).
Set `region: undefined` or omit region for global services, e.g., `createSignedFetcher({ service: 'iam' })`.