Amplify Toolbox
    Preparing search index...

    Function defineHosting

    • Create the hosting infrastructure as a standalone CDK entry point.

      ⚠️ Important: This must be called in a SEPARATE file (amplify/hosting.ts), NOT inside amplify/backend.ts. Hosting deploys as an independent CloudFormation stack so it can be deployed separately from the backend.

      Parameters

      • props: HostingProps = {}

        Hosting configuration (framework, build command, domain, etc.). All optional.

      Returns HostingResult

      Hosting result containing CDK resources, root stack, and a createStack helper.