When an AMI name collision occurs during image creation, use a safe
replacement strategy:
1. Create temp image with unique name
2. Wait for temp image to be available
3. Copy temp image to final name
4. Wait for final image to be available
5. Only then deregister old and temp images
This ensures CI jobs always have a working AMI available during
the daily image rebuild - the old image is kept until the new
one is fully ready.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>