You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Amplify Gen2 Sandbox复用已部署分支后端栈问题咨询

Use Deployed Backend Stack with Amplify Sandbox

To make Amplify Sandbox use your existing deployed branch's backend stack (including seed data), follow these steps:

  1. Generate configuration for your deployed branch
    Run the generate config command to create a configuration file pointing to your deployed stack. Replace YOUR_APP_ID and YOUR_DEPLOYED_BRANCH with your actual values:

    npx amplify generate config --app-id YOUR_APP_ID --branch YOUR_DEPLOYED_BRANCH --format json --out-dir config
    

    This creates amplifyconfiguration.json in the config directory, which contains the correct connection details for your deployed backend.

  2. Launch Sandbox with the existing configuration
    Instead of using --config-out-dir (which generates a new config for a fresh temporary stack), use the --config flag to tell Sandbox to reuse your pre-generated config:

    npx amplify sandbox --config ./config/amplifyconfiguration.json
    

This connects Sandbox directly to your deployed backend, allowing you to use its resources and seed data for local development. Note that any local backend changes you make may prompt you to push updates to the deployed stack—be cautious if working with a production or shared environment.

内容的提问来源于stack exchange,提问作者O. Durand

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.28 05:02:36