You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DEPLOYMENT.md
+30-8Lines changed: 30 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@ This guide walks you through deploying the Fullstack AgentCore Solution Template
6
6
7
7
## Prerequisites
8
8
9
-
Before deploying, ensure you have:
9
+
> **Note:** If you prefer not to install local tooling, see [Option B: Deploy via CodeBuild](#option-b-deploy-via-codebuild) — requires only Python 3.11+ and AWS CLI.
10
+
11
+
For local deployment (Option A), ensure you have:
10
12
11
13
-**Node.js 20+** installed (see [AWS guide for installing Node.js on EC2](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html))
12
14
-**AWS CLI** configured with credentials (`aws configure`) - see [AWS CLI Configuration guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html)
@@ -146,7 +148,8 @@ The CDK stack auto-creates a security group for the AgentCore Runtime. This same
146
148
## Deployment Steps
147
149
148
150
### TL;DR version
149
-
Here are the commands to deploy backend and frontend:
151
+
152
+
**Full local setup (Node.js + Docker + CDK):**
150
153
```bash
151
154
cd infra-cdk
152
155
npm install
@@ -156,15 +159,14 @@ cd ..
156
159
python scripts/deploy-frontend.py
157
160
```
158
161
159
-
### Deploy Without Local Tooling (via CodeBuild)
160
-
161
-
If you don't have Node.js, Docker, or CDK installed locally, you can deploy entirely in the cloud using a temporary CodeBuild project. Requires only Python 3.8+ and AWS CLI:
162
-
162
+
**No local tooling (just Python + AWS CLI):**
163
163
```bash
164
164
python scripts/deploy-with-codebuild.py
165
165
```
166
166
167
-
See `scripts/README.md` for details and required IAM permissions.
167
+
### Option A: Deploy Locally (CDK + Docker)
168
+
169
+
This path requires the full set of prerequisites listed above (Node.js, Docker, CDK, Python).
168
170
169
171
### 1. Install Dependencies
170
172
@@ -248,6 +250,24 @@ You will see the URL for application in the script's output, which will look sim
248
250
1. Sign in with the Cognito user you created
249
251
1. You'll be prompted to change your temporary password on first login
250
252
253
+
---
254
+
255
+
### Option B: Deploy via CodeBuild
256
+
257
+
Requires only Python 3.11+, AWS CLI, and git — no Node.js, Docker, or CDK needed.
258
+
259
+
1. Edit `infra-cdk/config.yaml` (see [Configuration](#configuration) above)
260
+
2. Stage or commit your changes — only git-tracked or staged files are packaged for deployment. Untracked files are skipped and reported as a warning.
261
+
3. Run:
262
+
263
+
```bash
264
+
python scripts/deploy-with-codebuild.py
265
+
```
266
+
267
+
The script packages your git-tracked source and runs the full CDK + frontend deploy in the cloud via CodeBuild, streaming logs to your terminal. On success, the build resources (project, IAM role, permission boundary, S3 bucket) are removed; on failure they are retained for debugging (the script prints the console URL and log group) and reused on the next run.
268
+
269
+
See `scripts/README.md` for details and required IAM permissions.
270
+
251
271
## Post-Deployment
252
272
253
273
### Updating the Application
@@ -282,7 +302,9 @@ cd infra-cdk
282
302
cdk destroy --force
283
303
```
284
304
285
-
**Warning**: This will delete all data including S3 buckets created during deployment and ECR images.
305
+
If you deployed via CodeBuild (Option B), its build resources are already removed on success (or on the next successful run) — only the deployed FAST stack above needs tearing down.
306
+
307
+
**Warning**: `cdk destroy` will delete all data including S3 buckets created during deployment and ECR images.
Copy file name to clipboardExpand all lines: scripts/README.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,22 +55,24 @@ change anything:
55
55
56
56
### CodeBuild Deployment
57
57
58
-
-`deploy-with-codebuild.py` - Deploys the entire FAST stack (backend + frontend) using an ephemeral CodeBuild project. No local Node.js, Docker, CDK, or npm required — only Python 3.8+ and AWS CLI.
58
+
-`deploy-with-codebuild.py` - Deploys the entire FAST stack (backend + frontend) using a CodeBuild project. No local Node.js, Docker, CDK, or npm required — only Python 3.11+, AWS CLI, and git.
59
59
60
60
```bash
61
61
python scripts/deploy-with-codebuild.py
62
62
```
63
63
64
-
Creates temporary AWS resources (S3 bucket, IAM role with permission boundary, CodeBuild project), runs the full deployment in the cloud, streams logs to your terminal, and cleans up all temporary resources on exit.
64
+
Packages your git-tracked source and runs the full deployment in the cloud via a CodeBuild project, streaming logs to your terminal. On a **successful** build, all created resources (S3 source bucket, CodeBuild project, IAM role, permission boundary) are removed. On a **failed** build, they are retained for debugging and reused on the next run.
65
65
66
-
The temporary IAM role is created with `AdministratorAccess` but constrained by a permission boundary that explicitly denies dangerous actions such as `iam:CreateUser`, `iam:CreateAccessKey`, `organizations:*`, and others. This prevents privilege escalation even if the build is compromised.
66
+
Only git-tracked or staged files are deployed — stage or commit first, as untracked files are skipped with a warning. This does not remove your deployed FAST stack; for that, run `cd infra-cdk && cdk destroy`.
67
+
68
+
The IAM role has `AdministratorAccess` constrained by a permission boundary that denies dangerous actions (`iam:CreateUser`, `iam:CreateAccessKey`, `organizations:*`, etc.) to prevent privilege escalation.
67
69
68
70
Your IAM user/role needs these permissions to run the script:
0 commit comments