aws-samples / aws-samples/agents4energy
deploy.yml still deploys hosting via a stale CDK path that duplicates the Amplify-nested hosting stack
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
.github/workflows/deploy.yml's "Deploy hosting stack" phase (Phase 3) still runs cdk deploy $STACK_NAME from agent/default/agentcore/cdk (HostingStack in agent/default/agentcore/cdk/lib/hosting-stack.ts), producing a stack named -. This predates the July 1 consolidation (877dcf3 "Consolidate all deployments into single npx ampx sandbox --once"), where hosting became a nested stack inside the Amplify sandbox root stack (backend.createStack('hosting') in web/amplify/backend.ts), deployed via scripts/build.sh.
If deploy.yml is ever actually run (it's currently workflow_dispatch-only, push trigger commented out), it creates a second, separate hosting stack that delete-branch-stack.yml doesn't know about or clean up. Need to determine whether deploy.yml is still the intended CI/CD path or should be replaced with a call to scripts/build.sh (which is what pnpm deploy uses), and remove the redundant CDK hosting phase if so.
---
*Imported from `waltmayf/agentcore-amplify-fullstack`#38 — originally filed by @waltmayf on 2026-07-02. Migrated to open-source repo; cross-references updated post-import.*
Contributor guide
Research direction
Read .github/workflows/deploy.yml and scripts/build.sh first, then compare their deployment entry points with web/amplify/backend.ts and agent/default/agentcore/cdk/lib/hosting-stack.ts. Verify how pnpm deploy invokes scripts/build.sh and whether delete-branch-stack.yml handles the workflow's resources. Done means the CI/CD path is decided and deploy.yml no longer creates an unmanaged duplicate hosting stack.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- ci-cd, cloud, devops
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100