用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aws-samples/sample-opencode-with-bedrock --skill deploy-guide命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | deploy-guide |
| description | Walk through the full OpenCode Stack deployment step by step |
You are guiding the user through a full deployment of the OpenCode Stack. Work through each phase in order, verifying success before proceeding to the next.
Run preflight checks. Execute the same checks as the deploy-preflight skill (AWS credentials, Node.js, container builder, cdk.context.json, npm deps, CDK synth). If any required check fails, stop and help the user fix it.
Check for cdk.context.json. If it doesn't exist, tell the user to run ./scripts/setup.sh — it's an interactive wizard that configures domains, auth mode, and validates prerequisites. Do not try to create cdk.context.json manually.
Execute each phase by running the corresponding deploy.sh subcommand. After each phase, verify success before moving on.
./scripts/deploy.sh network
What it does: Creates the VPC, subnets, NAT Gateway, and ACM certificate.
Verify: Check that the CloudFormation stacks OpenCodeNetwork-<env> and OpenCodeCertificate-<env> are in CREATE_COMPLETE or UPDATE_COMPLETE state.
./scripts/deploy.sh auth
What it does: Deploys OIDC authentication (Cognito user pool or external provider config). Writes SSM parameters for the OIDC endpoints and client IDs. For Cognito mode, automatically creates the ALB client secret in Secrets Manager.
Verify: Confirm SSM parameters exist under /opencode/<env>/oidc/ and the Secrets Manager secret opencode/<env>/oidc-alb-client-secret has a value.
./scripts/deploy.sh api
What it does: Deploys the API stack (ECR repository, ECS Fargate service, JWT ALB with HTTPS listener and rules). Builds and pushes the router container image. If the ECR repo already existed, the image is pushed before the stack deploy to avoid pull errors.
Verify: Check that:
OpenCodeApi-<env> deployed successfully./scripts/deploy.sh distribution
What it does: Deploys the landing page Lambda function, S3 assets bucket, and OIDC ALB for browser-based authentication.
Verify: Check that:
OpenCodeDistribution-<env> deployed successfully./scripts/deploy.sh share
What it does: Builds the share Lambda code (API + WebSocket handlers), then deploys the ShareStack with enableShareFeature=true. This creates an S3 bucket for session data, a DynamoDB table for WebSocket connections, a WebSocket API Gateway with connect/disconnect/default routes, 5 Lambda functions (API handler, connect, disconnect, default, broadcast), and ALB listener rules on both the API ALB (priorities 7-8, JWT auth) and the Distribution ALB (priorities 7-8, OIDC auth).
Verify: Check that:
OpenCodeShare-<env> deployed successfully/opencode/<env>/share/websocket-url has a valuewscat -c <websocket-url>curl -sf https://<api-domain>/api/share/health (with valid JWT)Note: This phase is optional. If you skip it, the share feature is simply not available — no other stacks are affected.
Run ./scripts/deploy.sh info to display the API and web endpoints.
Print a final summary with the endpoints and suggest the user test:
curl https://<api-domain>/healthhttps://<web-domain>/ in a browserIf any phase fails, help the user diagnose the issue. Check CloudFormation events, ECS service events, and container logs as needed.