Amplify Toolbox
    Preparing search index...
    • Resolve a config value (SSM Parameter Store) at runtime. Same resolution order as getSecret (env-first for local dev, then the injected locator).

      Type safety. key is typed as ConfigKey — any string by default, narrowing to your declared config keys after npm run typegen (see getSecret). With config('K', { schema }) the return type is the schema's inferred output and the value is JSON-parsed at runtime — no JSON.parse(...) and no any.

      Type Parameters

      • K extends string

      Parameters

      • key: K

        The logical name, exactly as passed to config('<key>').

      Returns Promise<string>

      The value — parsed to the schema's type when a schema was declared, else the string.

      If the key is neither in process.env nor backed by an injected locator.