API Reference
    Preparing search index...
    • Create a drop-in fetch function that signs every request with the given Signer before sending it.

      The returned function has the same signature as the global fetch, so it can be passed to libraries that accept a custom fetch implementation, or used directly.

      Parameters

      • signer: Signer

        The signer used to sign each request before it is sent.

      • options: SignedFetcherOptions = {}

        Optional configuration, e.g. a custom fetch implementation.

      Returns (input: string | URL | Request, init?: RequestInit) => Promise<Response>

      import { SigV4Signer } from '@aws-lambda-powertools/signer/sigv4';
      import { createSignedFetcher } from '@aws-lambda-powertools/signer/fetch';

      const signer = new SigV4Signer({ service: 'execute-api' });
      const signedFetch = createSignedFetcher(signer);

      const response = await signedFetch('https://example.execute-api.us-east-1.amazonaws.com/items');