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
fix(docs): add X-Ray resource policy prerequisite and build credential notes
On a fresh AWS account, `aws xray update-trace-segment-destination`
fails with AccessDeniedException because X-Ray needs a CloudWatch Logs
resource policy before it can write spans. Added the prerequisite
`aws logs put-resource-policy` command to Quick Start Step 3.
Also documented that `mise run build` requires AWS credentials with
ec2:DescribeAvailabilityZones for CDK synthesis, and added common error
table entries for the X-Ray, build credential, and non-TTY deploy issues.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/guides/QUICK_START.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Go from zero to your first agent-created pull request in about 30 minutes. This
6
6
7
7
Install these before you begin:
8
8
9
-
-**AWS account** with credentials configured (`aws configure`)
9
+
-**AWS account** with credentials configured (`aws configure`). If you use named profiles, set `AWS_PROFILE` before running any commands in this guide.
10
10
-**Docker** - for building the agent container image
-**AWS CDK CLI** - `npm install -g aws-cdk` (after mise is active)
@@ -35,6 +35,8 @@ mise run build
35
35
36
36
`mise run install` installs all JavaScript and Python dependencies across the monorepo. `mise run build` compiles the CDK app, the CLI, the agent image, and the docs site. A successful build means you are ready to deploy.
37
37
38
+
> **Note:**`mise run build` includes CDK synthesis, which queries AWS for availability zones. Your active AWS credentials must have at least `ec2:DescribeAvailabilityZones` permission, or the build will fail. If you use named profiles, make sure `AWS_PROFILE` is set before running the build.
39
+
38
40
## Step 2 - Prepare a repository
39
41
40
42
The agent works by cloning a GitHub repository, creating a branch, making code changes, running the build and tests, and opening a pull request. This means it needs **write access** to a real repository.
@@ -75,7 +77,12 @@ The `repo` value must match **exactly** what you will pass to the CLI later (`ow
75
77
The CDK stack deploys the full platform: API Gateway, Lambda functions (orchestrator, task CRUD, webhooks), DynamoDB tables, AgentCore Runtime, VPC with network isolation, Cognito user pool, and CloudWatch dashboards.
76
78
77
79
```bash
78
-
# One-time account setup (X-Ray destination)
80
+
# One-time account setup: allow X-Ray to write spans to CloudWatch Logs.
81
+
# On a fresh account, X-Ray needs a resource policy before the destination can be set.
The X-Ray command is a one-time per-account setup. CDK bootstrap provisions the staging resources CDK needs (S3 bucket, IAM roles). The deploy itself takes around 10 minutes - most of the time is spent building the Docker image and provisioning the AgentCore Runtime.
95
+
The X-Ray commands are a one-time per-account setup. On a fresh account the `put-resource-policy` call is required first — without it, the `update-trace-segment-destination` command fails with an `AccessDeniedException` because X-Ray cannot write to the `aws/spans` log group. CDK bootstrap provisions the staging resources CDK needs (S3 bucket, IAM roles). The deploy itself takes around 10 minutes - most of the time is spent building the Docker image and provisioning the AgentCore Runtime.
89
96
90
97
## Step 4 - Store the GitHub token
91
98
@@ -183,7 +190,10 @@ Here is what the platform did after you ran `bgagent submit`:
183
190
|---|---|---|
184
191
|`yarn: command not found`| Corepack not enabled or mise not activated in your shell | Run `eval "$(mise activate zsh)"`, then `corepack enable && corepack prepare yarn@1.22.22 --activate`|
185
192
|`MISE_EXPERIMENTAL required`| Namespaced tasks need the experimental flag |`export MISE_EXPERIMENTAL=1`|
|`AccessDeniedException` on `update-trace-segment-destination`| Fresh account missing CloudWatch Logs resource policy for X-Ray | Run `aws logs put-resource-policy` first (see Step 3) |
194
+
| CDK deploy fails with "X-Ray Delivery Destination..." | Missing one-time account setup | Run both X-Ray commands in Step 3 |
195
+
|`mise run build` fails with `ec2:DescribeAvailabilityZones` error | AWS credentials missing or insufficient for CDK synth | Set `AWS_PROFILE` or configure credentials with at least EC2 read access |
196
+
| CDK deploy prompts for approval and hangs | Non-interactive terminal (CI/CD, scripts) | Pass `--require-approval never` to `cdk deploy` or use an interactive terminal |
187
197
|`put-secret-value` returns double-dot endpoint |`REGION` variable is empty | Set `REGION=us-east-1` (or your actual region) before running the command |
188
198
|`REPO_NOT_ONBOARDED` on task submit | Blueprint `repo` does not match what you passed to the CLI | Check `cdk/src/stacks/agent.ts` - the `repo` value must be exactly `owner/repo` matching your fork |
189
199
|`INSUFFICIENT_GITHUB_REPO_PERMISSIONS`| PAT is missing required permissions or is scoped to the wrong repo | Regenerate the PAT with Contents (read/write) and Pull requests (read/write) scoped to your fork, then update Secrets Manager |
Copy file name to clipboardExpand all lines: docs/src/content/docs/getting-started/Quick-start.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Go from zero to your first agent-created pull request in about 30 minutes. This
10
10
11
11
Install these before you begin:
12
12
13
-
-**AWS account** with credentials configured (`aws configure`)
13
+
-**AWS account** with credentials configured (`aws configure`). If you use named profiles, set `AWS_PROFILE` before running any commands in this guide.
14
14
-**Docker** - for building the agent container image
-**AWS CDK CLI** - `npm install -g aws-cdk` (after mise is active)
@@ -39,6 +39,8 @@ mise run build
39
39
40
40
`mise run install` installs all JavaScript and Python dependencies across the monorepo. `mise run build` compiles the CDK app, the CLI, the agent image, and the docs site. A successful build means you are ready to deploy.
41
41
42
+
> **Note:**`mise run build` includes CDK synthesis, which queries AWS for availability zones. Your active AWS credentials must have at least `ec2:DescribeAvailabilityZones` permission, or the build will fail. If you use named profiles, make sure `AWS_PROFILE` is set before running the build.
43
+
42
44
## Step 2 - Prepare a repository
43
45
44
46
The agent works by cloning a GitHub repository, creating a branch, making code changes, running the build and tests, and opening a pull request. This means it needs **write access** to a real repository.
@@ -79,7 +81,12 @@ The `repo` value must match **exactly** what you will pass to the CLI later (`ow
79
81
The CDK stack deploys the full platform: API Gateway, Lambda functions (orchestrator, task CRUD, webhooks), DynamoDB tables, AgentCore Runtime, VPC with network isolation, Cognito user pool, and CloudWatch dashboards.
80
82
81
83
```bash
82
-
# One-time account setup (X-Ray destination)
84
+
# One-time account setup: allow X-Ray to write spans to CloudWatch Logs.
85
+
# On a fresh account, X-Ray needs a resource policy before the destination can be set.
The X-Ray command is a one-time per-account setup. CDK bootstrap provisions the staging resources CDK needs (S3 bucket, IAM roles). The deploy itself takes around 10 minutes - most of the time is spent building the Docker image and provisioning the AgentCore Runtime.
99
+
The X-Ray commands are a one-time per-account setup. On a fresh account the `put-resource-policy` call is required first — without it, the `update-trace-segment-destination` command fails with an `AccessDeniedException` because X-Ray cannot write to the `aws/spans` log group. CDK bootstrap provisions the staging resources CDK needs (S3 bucket, IAM roles). The deploy itself takes around 10 minutes - most of the time is spent building the Docker image and provisioning the AgentCore Runtime.
93
100
94
101
## Step 4 - Store the GitHub token
95
102
@@ -187,7 +194,10 @@ Here is what the platform did after you ran `bgagent submit`:
187
194
|---|---|---|
188
195
|`yarn: command not found`| Corepack not enabled or mise not activated in your shell | Run `eval "$(mise activate zsh)"`, then `corepack enable && corepack prepare yarn@1.22.22 --activate`|
189
196
|`MISE_EXPERIMENTAL required`| Namespaced tasks need the experimental flag |`export MISE_EXPERIMENTAL=1`|
|`AccessDeniedException` on `update-trace-segment-destination`| Fresh account missing CloudWatch Logs resource policy for X-Ray | Run `aws logs put-resource-policy` first (see Step 3) |
198
+
| CDK deploy fails with "X-Ray Delivery Destination..." | Missing one-time account setup | Run both X-Ray commands in Step 3 |
199
+
|`mise run build` fails with `ec2:DescribeAvailabilityZones` error | AWS credentials missing or insufficient for CDK synth | Set `AWS_PROFILE` or configure credentials with at least EC2 read access |
200
+
| CDK deploy prompts for approval and hangs | Non-interactive terminal (CI/CD, scripts) | Pass `--require-approval never` to `cdk deploy` or use an interactive terminal |
191
201
|`put-secret-value` returns double-dot endpoint |`REGION` variable is empty | Set `REGION=us-east-1` (or your actual region) before running the command |
192
202
|`REPO_NOT_ONBOARDED` on task submit | Blueprint `repo` does not match what you passed to the CLI | Check `cdk/src/stacks/agent.ts` - the `repo` value must be exactly `owner/repo` matching your fork |
193
203
|`INSUFFICIENT_GITHUB_REPO_PERMISSIONS`| PAT is missing required permissions or is scoped to the wrong repo | Regenerate the PAT with Contents (read/write) and Pull requests (read/write) scoped to your fork, then update Secrets Manager |
0 commit comments