Egypt warned them days before, the USA has confirmed the warning by Egypt.
I’m not so sure on this, I think the US politicians that said this could well be repeating the same single source we’ve heard. Egypt didn’t officially say that they notified Israel, either, that came from a source within Egypt’s intelligence services. It may well be true, but I just wouldn’t rate those statements as good evidence - as far as I’m aware no one from within the US intelligence community has confirmed it.