Repository navigation
Browser profile restores cookie but not localStorage across sessions in two regions #647
Description
Describe the behavior
A Browser Profile created for the AWS-managed aws.browser.v1 Browser restores a persistent cookie into a new profiled session, but does not restore a localStorage item from the same exact HTTPS origin. The result reproduced in both eu-central-1 and us-west-2 using identical client bytes.
I am trying to determine whether an additional documented lifecycle step is required, whether this is a known limitation, or whether it is unexpected service behavior.
Minimal synthetic sequence
- Create one Browser Profile.
- Start one unprofiled
aws.browser.v1source session. - Navigate to exact
https://example.com. - Set one persistent cookie and one localStorage item with synthetic values.
- Reload the page and verify both values from the exact same origin.
- Wait 500 ms, verify the origin again, then disconnect the local Playwright CDP client while leaving the AgentCore session active.
- Call
SaveBrowserSessionProfileexactly once. - Verify the Save response binds the exact profile, Browser, and source session. Poll
GetBrowserProfileuntilREADYwithlastSavedBrowserIdandlastSavedBrowserSessionIdmatching that source. - Stop the source session.
- Start a new
aws.browser.v1session with the exact saved profile and verify the profile configuration through session readback. - Navigate once to exact
https://example.comand read the same page at cumulative 0, 5, 15, 30, and 60 seconds without renavigation.
At every restore checkpoint the final origin remained exact. The cookie was present at 0 seconds. The localStorage item was absent at every checkpoint through 60 seconds.
The same result occurred in Frankfurt and Oregon. The test used no custom Browser, enterprise policy, proxy, extension, model, or retailer content.
Both sessions were stopped after each run. All test-created stack, profile, and IAM resources were absent, and no reserved READY sessions remained, across ten repeated post-run checks in each region.
Expected behavior
The current Browser Profile documentation says that profile save/load captures and restores cookies and local storage. I expected the localStorage item from the verified source origin to be available in the new profiled session, as the cookie was.
Could you confirm:
- whether localStorage persistence is supported for
aws.browser.v1in both regions; - whether any additional flush, disconnect, Save, readiness, or restore sequence is required; and
- whether this is a known issue or limitation?
Environment
bedrock-agentcore1.21.0boto31.43.35botocore1.43.35- Playwright 1.62.0
- Python 3.12.3
- Linux x86_64
No account IDs, resource identifiers, request IDs, session IDs, credentials, signed URLs, or raw payloads are included here. I can provide private identifiers and UTC windows through an appropriate private AWS channel if needed.
Activity