ConstThis registry-backed API is retained solely so OLD published
@aws-amplify/adapter-nextjs versions (≤ 1.7.3, peer
aws-amplify: ^6.16.4) — which call it at runtime with cookie-backed
token/credentials providers in libraryOptions — keep working against this
version of aws-amplify. It will be removed in the next major version.
The created context spec is a REAL branded AmplifyContext (structurally
compatible with the legacy ContextSpec shape), so operations may pass it
both to new context-first server APIs (e.g. fetchAuthSession(contextSpec))
and to the deprecated getAmplifyServerContext(contextSpec).amplify lookup.
New code should build a context explicitly with createAmplifyContext()
(or use @aws-amplify/adapter-nextjs's createRunWithAmplifyServerContext
for per-request isolation) instead.
The low level function that supports framework specific helpers. It creates an Amplify server context based on the input and runs the operation with injecting the context, and finally returns the result of the operation.