InternalToken and ScannerToken. Do not use it for the connection-envelope key or third-party integration credentials: those require data migration or provider reconnection, not blind replacement.
Prepare the maintenance window
Confirm that the stack is stable, no effect has an unknown outcome, and the operations alert subscription is confirmed. Record the current secret version IDs and service/runtime revisions without recording secret values. Keep theAWSPREVIOUS version until the new ECS and AgentCore revisions pass health checks.
The script performs a rolling replacement. Brief internal authorization failures are possible while old and new tasks overlap, so pause new operator work before proceeding.
Authorize one rotation
FAILED, ECS does not stabilize, or health checks report authorization failures after the replacement deadline.
Verify the rotation
Run the following checks through normal interfaces:- Load
/api/healththrough the public load balancer. - Submit a read-only chat status request and confirm the worker-to-web callback succeeds.
- Upload the licensed scanner fixture and confirm the scanner-to-web authorization succeeds.
- Invoke a read-only AgentCore specialist request and confirm the new runtime reaches the private web service.
- Confirm that no old task definition or runtime version remains active.
Recover a failed rotation
If the new version fails, promote the recordedAWSPREVIOUS version back to AWSCURRENT, force the same ECS and AgentCore replacements, and repeat the health checks. Do not improvise a second secret value while the outcome of the first replacement is unknown.