agentcore deploy fails with 'Response object is too long' when config bundle components exceed 4 KB
Maintainer antworten meist innerhalb von 1 Tag
@notgitika arbeitet bereits daran.
Seit 19.10.2026.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- aws, typescript
Rechercherichtung
Start by tracing agentcore deploy and agentcore validate, then inspect how the @aws/agentcore-cdk construct handles ConfigBundleMyConfig/Components through Custom::AWSCDKCfnJson. Compare that path with the update-configuration-bundle API call mentioned in the issue. Done means large components can deploy and create a branch version, or validation reports a size limit before CloudFormation runs.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
agentcore deploy fails when a config bundle's components JSON is larger than ~4 KB. A realistic system prompt in configBundles[].components[].configuration.systemPrompt easily exceeds this.
The @aws/agentcore-cdk construct (0.1.0-alpha.54) resolves the components map, which includes {{runtime:<name>}} placeholders, through a Custom::AWSCDKCfnJson custom resource. CloudFormation limits a custom resource response to 4096 bytes. When the components are bigger than that, the custom resource fails and the stack rolls back.
The CLI also has no other way to publish a larger configuration. agentcore config-bundle only offers versions, diff and create-branch. The only workaround is calling aws bedrock-agentcore-control update-configuration-bundle directly, outside the project, which makes the deployed bundle drift from agentcore.json.
Steps to Reproduce
- Create a project with a CodeZip runtime and a config bundle targeting it:
"configBundles": [ { "name": "myConfig", "type": "ConfigurationBundle", "components": { "{{runtime:myagent}}": { "configuration": { "systemPrompt": "<any string longer than ~4,000 characters>" } } }, "branchName": "mainline", "commitMessage": "Long prompt" } ] agentcore validate: passes.agentcore deploy --target dev --diff: shows the expected change toCustom::AWSCDKCfnJson .../ConfigBundleMyConfig/Components/Resource.agentcore deploy --target dev -y
Expected Behavior
The bundle deploys and a new version is created on the branch. The configuration bundle API accepts this payload: the same ~9.3 KB components map works through aws bedrock-agentcore-control update-configuration-bundle.
If there is a size limit, agentcore validate (or the deploy preflight) should report it before CloudFormation runs.
Actual Behavior
CDK deploy failed: ❌ AgentCore-<project>-dev failed: DeploymentError: Resource updates failed:
└─ AgentCore-<project>-dev
└─ Application
└─ ConfigBundleMyConfig
└─ Components
└─ Resource
└─ Default (Custom::AWSCDKCfnJson ApplicationConfigBundleMyConfigComponents...)
🛑 Response object is too long.
Source Location: ...aws-cdk-lib, new AgentCoreApplication in @aws/agentcore-cdk...
The stack ends in UPDATE_ROLLBACK_COMPLETE and the bundle keeps its previous version.
CLI Version
0.31.1
Operating System
macOS
Additional Context
@aws/agentcore-cdk0.1.0-alpha.54, Node 24.12.0, region eu-central-1.- In our case the components JSON was ~9.3 KB (a ~8.7 KB system prompt plus the runtime ARN key).
- Possible fixes:
- Keep the token-keyed map out of the custom resource response. CloudFormation limits the response, not the request, so a custom resource that creates or updates the bundle itself, without echoing the components back, avoids the limit.
- Or support a file reference (e.g.
systemPromptFile) that the CLI pushes through the configuration-bundle API, or publish viaconfig-bundlesubcommands.
- At minimum,
agentcore validateshould warn when the serialized components exceed the limit.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 339
- Forks
- 129
- Ø Merge
- 19 Std. 21 Min.
- Gemergte PRs (30 T.)
- 125
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus aws/agentcore-cli
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
aws/agentcore-cli#2940 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
aws/agentcore-cli#2939 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
aws/agentcore-cli#2938 ·
Maintainer antworten meist innerhalb von 1 Tag
-
invoke: CUSTOM_JWT runtime errors discard the response body and error type (e.g. "Token has expired")Evtl. vergeben @n1dhruv hat das vor 6 Tagen übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
aws/agentcore-cli#2875 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
--debug has no effect; service error name, HTTP status and request ID never reach the terminalEvtl. vergeben @abhiramshaji-cyber hat das vor 3 Tagen übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
aws/agentcore-cli#2874 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in aws/agentcore-cli
Ähnliche Issues
-
manually bump balena-preload to ^19.0.6Evtl. vergeben @shaunmulligan hat das heute übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 66/100
balena-io/balena-cli#3200 ·
Maintainer antworten meist innerhalb von 1 Tag
-
`MaterializedChatMessage._text` is quadratic in the number of text chunks (`+=` followed by `endsWith`), driving the extension host to heap OOMEvtl. vergeben @olegius88 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
microsoft/vscode-prompt-tsx#205 ·
-
triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 64/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
melgarafael/DeskcommCRM#5340 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
ehmpathy/rhachet-roles-ehmpathy#1529 ·
Maintainer antworten meist innerhalb von 1 Tag