Gun amnesty program announced & you turn in all sorts of exotic weapons-Still immune?

Re these gun amnesty programs where you can turn in various illegal weapons, and the police (assumedly) won’t come after you. Lets say such a program is announced and you turn up with a few crates of brand new rocket launchers, automatic sub-machine guns, mini-guns etc.

In the United States (link was for a Canadian program) are you effectively immune from being prosecuted (assuming the weapons were not used in the commission of a crime) if you turn them in under this type of program? Does this sort of “amnesty” offer have any legal weight at all if the feds decide they aren’t playing by it? Would this amount to entrapment in some way?

As a side note what kind of legal “permission” (if any) do the police need to obtain from the state to make an amnesty offer like this?