• Creates the runWithAmplifyServerContext function to run Amplify server side APIs in an isolated request context.

    Parameters

    Returns CreateServerRunnerOutput

    An object that contains the runWithAmplifyServerContext function.

    Remarks

    This function should be called only once; you can use the returned runWithAmplifyServerContext across your codebase.

    Example

    import { createServerRunner } from '@aws-amplify/adapter-nextjs';
    import config from './amplifyconfiguration.json';

    export const { runWithAmplifyServerContext } = createServerRunner({ config })