Speaking to the official club website, Chief Executive Simon Clegg said: "As part of our pre-season schedule Roy [Keane] wanted a high profile friendly against top opposition at home and we've got that with West Ham coming to Portman Road.
"It's not too far for their supporters to travel and with the Championship season starting a week later, it should be a good atmosphere for what I'm sure will be an exciting and competitive match."
The match will take place at Portman Road on Saturday, July 31. Kick-off 3.00pm with tickets on sale earlier in the month.