launch-with-aws
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLaunch with AWS
基于AWS启动应用
Drives an AWS migration end-to-end using CLI scripts. Takes a user's web application, analyzes it, generates a migration plan with cost estimate, and delivers deployable AWS Blocks infrastructure code.
The AWS MCP server is recommended but is not required. This skill works standalone via its CLI scripts in any agent environment.
通过CLI脚本端到端驱动AWS迁移流程。接收用户的Web应用,对其进行分析,生成包含成本估算的迁移计划,并交付可部署的AWS Blocks基础设施代码。
推荐使用AWS MCP服务器,但并非必需。该技能可通过其CLI脚本在任何Agent环境中独立运行。
Script Invocation
脚本调用
All commands are run via:
bash
python3 scripts/launch_with_aws.py <command> [args...]where is relative to this skill directory. The agent MUST set the working directory to the skill root before invoking commands.
scripts/Required files: launch_with_aws.py, launch_config.py, auth.py, auth_callback_server.py, launch_api_client.py, archive.py, service model. When loaded via MCP, fetch all and write to a temp directory preserving structure before invoking.
Each command outputs JSON to stdout on success, or exits non-zero with a JSON error on stderr.
Dependencies: Python 3.10+ and . The script checks both on startup and exits with a clear error if either is missing.
boto3所有命令通过以下方式运行:
bash
python3 scripts/launch_with_aws.py <command> [args...]其中是相对于本技能目录的路径。Agent在调用命令前必须将工作目录设置为技能根目录。
scripts/所需文件:launch_with_aws.py、launch_config.py、auth.py、auth_callback_server.py、launch_api_client.py、archive.py、service model。通过MCP加载时,需先获取所有文件并写入临时目录,保留原有结构后再调用脚本。
每个命令执行成功时会向标准输出(stdout)输出JSON;若执行失败,则会以非零状态退出,并向标准错误(stderr)输出JSON格式的错误信息。
依赖项:Python 3.10+和。脚本启动时会检查这两项,若缺失则输出明确的错误信息后退出。
boto3Supported Application Types
支持的应用类型
Full-stack apps built with vibe-coding platforms, and frontend web applications and websites (static sites, SPAs, and SSR frameworks with static export).
| Origin Platform | What it covers |
|---|---|
| Lovable | Lovable-generated full-stack apps (React + Supabase) |
| Bolt.new | Bolt.new-generated full-stack apps (React + Supabase) |
| Replit | Replit-hosted full-stack apps (React + Express.js + PostgreSQL) |
| Framework | Examples |
|---|---|
| React ecosystem | React, CRA, Vite + React, Gatsby, Docusaurus |
| Vue ecosystem | Vue, Nuxt (static export), VitePress |
| Angular | Angular |
| Svelte ecosystem | Svelte, SvelteKit (static export) |
| SSR with static export | Next.js, Nuxt, Astro, SvelteKit |
| Other modern frameworks | Astro, Solid, Preact, Lit, Eleventy |
| Vite (generic) | Any Vite-based app |
Other frameworks may also work. If the user's app doesn't match these, see Unsupported Application Handling below.
由vibe-coding平台构建的全栈应用,以及各类前端Web应用和网站(静态站点、单页应用SPAs,以及支持静态导出的SSR框架)。
| 源平台 | 覆盖范围 |
|---|---|
| Lovable | Lovable生成的全栈应用(React + Supabase) |
| Bolt.new | Bolt.new生成的全栈应用(React + Supabase) |
| Replit | Replit托管的全栈应用(React + Express.js + PostgreSQL) |
| 框架 | 示例 |
|---|---|
| React生态 | React、CRA、Vite + React、Gatsby、Docusaurus |
| Vue生态 | Vue、Nuxt(静态导出)、VitePress |
| Angular | Angular |
| Svelte生态 | Svelte、SvelteKit(静态导出) |
| 支持静态导出的SSR框架 | Next.js、Nuxt、Astro、SvelteKit |
| 其他现代框架 | Astro、Solid、Preact、Lit、Eleventy |
| Vite(通用) | 任何基于Vite的应用 |
其他框架也可能适用。如果用户的应用与上述列表不匹配,请查看下方的不支持应用的处理方式。
What Gets Migrated vs. What Stays
迁移内容与保留内容
Lovable / Bolt.new apps (Supabase-backed):
| Component | What happens |
|---|---|
| Frontend & hosting | Migrated to AWS (S3 + CloudFront + Lambda) |
| Edge functions / server functions | Migrated to AWS Lambda |
| AI calls (e.g. Lovable AI Gateway) | Migrated to Amazon Bedrock |
| Database (Supabase DB) | Stays on Supabase — not migrated |
| Auth (Supabase Auth) | Stays on Supabase — not migrated |
| Storage & Realtime | Stays on Supabase — not migrated |
The app continues to call Supabase for database, auth, storage, and realtime from the AWS-hosted application.
Replit apps (Express.js + PostgreSQL):
| Component | What happens |
|---|---|
| Frontend & hosting | Migrated to AWS (S3 + CloudFront + Lambda) |
| Server logic (Express.js) | Migrated to AWS Lambda (API Gateway) |
| Database (PostgreSQL) | Schema and code migrated to AWS (Aurora Serverless / DynamoDB). Existing data is NOT migrated — customers must export and import their data separately. |
| Auth (Replit Auth) | Code migrated to AWS (Cognito). Existing user accounts are NOT migrated — customers must re-create or invite users in Cognito. |
| Realtime (WebSockets) | Migrated to AWS (AppSync Events) |
| File storage | Migrated to AWS (S3). Existing files are NOT migrated. |
Replit app infrastructure and code are migrated to AWS-native services, but existing data, user accounts, and files must be migrated separately by the customer.
Lovable / Bolt.new应用(基于Supabase):
| 组件 | 处理方式 |
|---|---|
| 前端与托管 | 迁移至AWS(S3 + CloudFront + Lambda) |
| Edge函数/服务器函数 | 迁移至AWS Lambda |
| AI调用(如Lovable AI Gateway) | 迁移至Amazon Bedrock |
| 数据库(Supabase DB) | 保留在Supabase — 不迁移 |
| 认证(Supabase Auth) | 保留在Supabase — 不迁移 |
| 存储与实时功能 | 保留在Supabase — 不迁移 |
迁移后的应用将继续从AWS托管环境调用Supabase的数据库、认证、存储和实时功能。
Replit应用(Express.js + PostgreSQL):
| 组件 | 处理方式 |
|---|---|
| 前端与托管 | 迁移至AWS(S3 + CloudFront + Lambda) |
| 服务器逻辑(Express.js) | 迁移至AWS Lambda(API Gateway) |
| 数据库(PostgreSQL) | 模式与代码迁移至AWS(Aurora Serverless / DynamoDB)。现有数据不会迁移 — 客户需自行导出并导入数据。 |
| 认证(Replit Auth) | 代码迁移至AWS(Cognito)。现有用户账户不会迁移 — 客户需在Cognito中重新创建或邀请用户。 |
| 实时功能(WebSockets) | 迁移至AWS(AppSync Events) |
| 文件存储 | 迁移至AWS(S3)。现有文件不会迁移。 |
Replit应用的基础设施和代码会迁移至AWS原生服务,但现有数据、用户账户和文件需由客户自行迁移。
Input Resolution
输入解析
Resolve the user's input to a local directory path or GitHub URL:
- If the user provides a local path: pass that path directly.
- If the user provides a GitHub URL: pass it directly (the service clones it server-side).
- If neither is provided: use the current working directory. If it doesn't look like an app directory, ask the user for the path.
将用户输入解析为本地目录路径或GitHub URL:
- 如果用户提供本地路径:直接传入该路径。
- 如果用户提供GitHub URL:直接传入该URL(服务会在服务器端克隆代码)。
- 如果两者都未提供:使用当前工作目录。若该目录看起来不像应用目录,则询问用户提供路径。
Flow
流程
Run the script commands in order, surfacing results to the user at each step:
按顺序运行脚本命令,并在每一步向用户展示结果:
1. Authentication
1. 身份认证
bash
python3 scripts/launch_with_aws.py auth-startAlways run first. Returns immediately with JSON:
- If already authenticated:
{"authenticated": true, "reusedCachedSession": true, "baseUrl": "..."} - If silent refresh succeeded:
{"authenticated": true, "reusedCachedSession": false, "baseUrl": "..."} - If interactive sign-in is needed:
{"authenticated": false, "signInUrl": "https://...", "pid": 12345, "port": 54321, "baseUrl": "..."}
When is , immediately display the to the user (so they can open it in their browser) and call in the same response:
authenticatedfalsesignInUrlauth-waitbash
python3 scripts/launch_with_aws.py auth-wait <pid>where is the value from the response. This blocks until the user completes browser sign-in (or times out after 600s). Returns on success.
<pid>pidauth-start{"authenticated": true, "baseUrl": "..."}bash
python3 scripts/launch_with_aws.py auth-start始终第一步运行。立即返回JSON:
- 若已认证:
{"authenticated": true, "reusedCachedSession": true, "baseUrl": "..."} - 若静默刷新成功:
{"authenticated": true, "reusedCachedSession": false, "baseUrl": "..."} - 若需要交互式登录:
{"authenticated": false, "signInUrl": "https://...", "pid": 12345, "port": 54321, "baseUrl": "..."}
当为时,立即向用户展示(以便他们在浏览器中打开),并在同一响应中调用:
authenticatedfalsesignInUrlauth-waitbash
python3 scripts/launch_with_aws.py auth-wait <pid>其中是响应中的值。该命令会阻塞,直到用户完成浏览器登录(或600秒后超时)。成功时返回。
<pid>auth-startpid{"authenticated": true, "baseUrl": "..."}2. Create Launch
2. 创建迁移任务
For a local directory, present this confirmation and wait for explicit approval:
Your source code will be uploaded to the Launch with AWS service to analyze your application and generate a migration plan. If you later approve execution, an AWS-hosted agent will modify a copy of your source code according to the plan and produce a migrated snapshot for you to download. Your source code is encrypted at rest, automatically deleted after 7 days, and never used to train AI models. We exclude Git history, Git-ignored files, and files matching common sensitive-file patterns. Sensitive-file filtering is best effort; review your project for secrets. Continue?
Do NOT call for a local directory until the user explicitly confirms. A missing or ambiguous response means no.
create-launchbash
python3 scripts/launch_with_aws.py create-launch <source-path-or-github-url> [name]Creates a launch from a local directory (zips, uploads, then creates) or a GitHub URL (passes directly). Returns JSON with the full object including .
launchlaunch.launchIdThe launch starts in status and automatically progresses through analysis and planning.
analyzing对于本地目录,先向用户展示以下确认信息,等待明确批准:
你的源代码将上传至Launch with AWS服务,用于分析应用并生成迁移计划。若你后续批准执行,AWS托管的Agent会根据计划修改源代码副本,并生成迁移后的快照供你下载。你的源代码在静态存储时会加密,7天后自动删除,且绝不会用于AI模型训练。我们会排除Git历史、Git忽略的文件,以及符合常见敏感文件模式的文件。敏感文件过滤为尽力而为;请检查你的项目是否包含密钥信息。是否继续?
在用户明确确认前,请勿为本地目录调用。若用户未回应或回应模糊,则视为拒绝。
create-launchbash
python3 scripts/launch_with_aws.py create-launch <source-path-or-github-url> [name]从本地目录(压缩、上传后创建)或GitHub URL(直接传入)创建迁移任务。返回包含完整对象的JSON,其中包括。
launchlaunch.launchId迁移任务初始状态为(分析中),会自动推进至分析和规划阶段。
analyzing3. Poll Launch Status
3. 查询迁移任务状态
bash
python3 scripts/launch_with_aws.py get-launch-status <launch-id>Poll until is (ready for execution), (needs context answers — see step 4), or . Key status progression:
statusplannedawaiting_inputfailed- → detecting app type and dependencies
analyzing - → needs context answers (see
awaiting_input)refine-plan - → generating migration plan
planning - → ready for execution
planned - → deployment in progress
executing - → done
completed - → check
failedfailureReason
If is , check for the questions that need answering. Inputs with must be answered before the launch can proceed; others are optional enrichment.
statusawaiting_inputcontextInputsrequired: truebash
python3 scripts/launch_with_aws.py get-launch-status <launch-id>轮询直到状态变为(准备执行)、(需要上下文回答 — 见步骤4)或(失败)。关键状态流程:
plannedawaiting_inputfailed- → 检测应用类型和依赖项
analyzing - → 需要上下文回答(见
awaiting_input)refine-plan - → 生成迁移计划
planning - → 准备执行
planned - → 部署进行中
executing - → 完成
completed - → 查看
failed(失败原因)failureReason
若状态为,检查获取需要回答的问题。标记为的输入必须回答,迁移任务才能继续;其他为可选补充信息。
awaiting_inputcontextInputsrequired: true4. Refine Plan (if awaiting_input)
4. 优化计划(若状态为awaiting_input)
bash
python3 scripts/launch_with_aws.py refine-plan <launch-id> key1=value1 key2=value2Provide context answers to refine the plan. Triggers re-planning.
bash
python3 scripts/launch_with_aws.py refine-plan <launch-id> key1=value1 key2=value2提供上下文回答以优化计划。触发重新规划。
5. Get Full Launch Details & Confirm
5. 获取完整迁移任务详情并确认
bash
python3 scripts/launch_with_aws.py get-launch <launch-id> plan,cost_estimateGet full launch details. Optional second argument is a comma-separated include list: , , , , .
analysisplanexecutioncost_estimatedownload_urlPresent the cost estimate and plan to the user. The field in the response contains , , and a breakdown with per-service costs.
costEstimateestimatedMonthlyCostregionservicesConfirmation Gate — present and wait for explicit approval:
Migration Summary
- App type: [detected type from analysis]
- Architecture: [target architecture from plan]
- Estimated monthly cost: $X.XX/month
- Region: us-east-1
Ready to proceed? This will execute the migration in an AWS-managed environment (no cost to you) and produce the migrated snapshot for you to download.
Do NOT call until the user explicitly confirms.
start-launch-executionbash
python3 scripts/launch_with_aws.py get-launch <launch-id> plan,cost_estimate获取完整的迁移任务详情。可选的第二个参数是逗号分隔的包含列表:(分析结果)、(迁移计划)、(执行信息)、(成本估算)、(下载链接)。
analysisplanexecutioncost_estimatedownload_url向用户展示成本估算和迁移计划。响应中的字段包含(月度估算成本)、(区域)以及按服务划分的成本明细。
costEstimateestimatedMonthlyCostregionservices确认环节 — 展示信息并等待用户明确批准:
迁移摘要
- 应用类型:[分析检测到的类型]
- 架构:[计划中的目标架构]
- 估算月度成本:$X.XX/月
- 区域:us-east-1
是否准备继续?这将在AWS托管环境中执行迁移(无需你承担费用),并生成迁移后的快照供你下载。
在用户明确确认前,请勿调用。
start-launch-execution6. Start Execution
6. 开始执行
bash
python3 scripts/launch_with_aws.py start-launch-execution <launch-id>Starts deployment. Then poll with until is or . Sleep at least 30 seconds between polls.
get-launch-statusstatuscompletedfailedbash
python3 scripts/launch_with_aws.py start-launch-execution <launch-id>启动部署。然后通过轮询,直到状态变为(完成)或(失败)。轮询间隔至少30秒。
get-launch-statuscompletedfailed7. Download
7. 下载
bash
python3 scripts/launch_with_aws.py get-launch-download-url <launch-id>Always present the full download URL to the user — they may need it to download the migrated snapshot directly or for reference.
bash
python3 scripts/launch_with_aws.py get-launch-download-url <launch-id>务必向用户展示完整的下载链接 — 他们可能需要直接下载迁移后的快照或作为参考。
8. List or Delete Launches
8. 列出或删除迁移任务
bash
python3 scripts/launch_with_aws.py list-launches
python3 scripts/launch_with_aws.py delete-launch <launch-id>bash
python3 scripts/launch_with_aws.py list-launches
python3 scripts/launch_with_aws.py delete-launch <launch-id>9. Post-Migration: Apply Migrated Code Locally
9. 迁移后:在本地应用迁移后的代码
After obtaining the download URL (adapt commands for the user's platform if not POSIX):
获取下载链接后(若用户平台非POSIX,需调整命令):
Step A: Download and unpack
步骤A:下载并解压
bash
curl -L -o /tmp/migration-snapshot.zip "<download_url>"
mkdir -p /tmp/migration-output
unzip -o /tmp/migration-snapshot.zip -d /tmp/migration-outputbash
curl -L -o /tmp/migration-snapshot.zip "<download_url>"
mkdir -p /tmp/migration-output
unzip -o /tmp/migration-snapshot.zip -d /tmp/migration-outputStep B: Prepare the local workspace
步骤B:准备本地工作区
Ensure the user's working directory is clean:
bash
cd <user-app-directory>
git statusIf there are uncommitted changes, ask the user to commit or stash first. Do NOT proceed with a dirty working tree.
确保用户的工作目录干净:
bash
cd <user-app-directory>
git status若存在未提交的更改,请询问用户先提交或暂存。请勿在工作目录未清理的情况下继续。
Step C: Apply migration (3-way merge)
步骤C:应用迁移(三方合并)
Create a migration branch and overlay the migrated files:
bash
cd <user-app-directory>
git checkout -b aws-migration
rsync -a /tmp/migration-output/ .
git status
git diff --statReview the changes with the user. Key additions to highlight:
- — AWS Blocks infrastructure definition
aws-blocks/ - — deployment instructions
DEPLOY.md - Any modified config files
If there are conflicts with the user's existing files, present them and ask how to resolve.
创建迁移分支并覆盖迁移后的文件:
bash
cd <user-app-directory>
git checkout -b aws-migration
rsync -a /tmp/migration-output/ .
git status
git diff --stat与用户一起审查更改。需重点突出的关键新增内容:
- — AWS Blocks基础设施定义
aws-blocks/ - — 部署说明文档
DEPLOY.md - 任何修改的配置文件
若与用户现有文件存在冲突,请展示冲突内容并询问用户如何解决。
Step D: Follow DEPLOY.md
步骤D:遵循DEPLOY.md文档
Read the file in the project root and follow its instructions to deploy the app to the user's AWS account. Typical steps:
DEPLOY.md- AWS authentication ()
aws login --profile aws-migrate --region us-east-1 - CDK bootstrap (first-time only):
npm install && npx cdk bootstrap - Deploy:
npx cdk deploy --all --progress events - Verify the CloudFront URL that CDK prints on completion.
Important: Always read from the migrated output — it is generated specifically for this app and architecture. Do not assume deployment steps from memory.
DEPLOY.md读取项目根目录下的文件,并按照其说明将应用部署到用户的AWS账户。典型步骤:
DEPLOY.md- AWS身份认证()
aws login --profile aws-migrate --region us-east-1 - CDK引导(首次部署需执行):
npm install && npx cdk bootstrap - 部署:
npx cdk deploy --all --progress events - 验证CDK完成部署后输出的CloudFront URL。
重要提示: 务必读取迁移输出中的文档 — 它是针对当前应用和架构生成的专属文档。请勿凭记忆假设部署步骤。
DEPLOY.mdUnsupported Application Handling
不支持应用的处理方式
If a launch fails during analysis with a indicating an unsupported app type (or the user's stack doesn't match the supported list):
failureReason-
Tell the user: "This app type isn't directly supported by Launch with AWS yet. Let me search for other skills that can help deploy this kind of application."
-
Search for relevant skills based on the app type (e.g.,
aws-serverless,aws-containers,databases-on-aws,deploy-on-aws,aws-cdk).sagemaker-ai
若迁移任务在分析阶段失败,且表明应用类型不被支持(或用户的技术栈不在支持列表中):
failureReason-
告知用户:“该应用类型目前暂不被Launch with AWS直接支持。我将搜索可帮助部署此类应用的其他技能。”
-
根据应用类型搜索相关技能(例如:、
aws-serverless、aws-containers、databases-on-aws、deploy-on-aws、aws-cdk)。sagemaker-ai