One issue that EC2 Mac customers often run into with custom AMI creation, is that launching new instances with the AMI can fail reachability health checks. This can be especially common if multiple "layers" of AMI builds are done.
See the "Network interfaces cached in AMIs" slide near the end of this re:Invent 2024 presentation.
Make sure you do these two steps (mentioned on that slide) at the end of the build:
sudo rm -f /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
sudo shutdown -h now