Are Amazon river trips in Brazil safe?

I'd love to look into going on boat trip on the amazon river, into the jungle, and getting to explore some of the jungle and see some towns along the river banks, but I seem to remember once ina while noticing stories in the newspapers about attacks made on boats on the Amazon River. Are the occasional fluke attacks or is it generally an unsafe thing to do (to go on the amazon river)? Are there certain areas that are more/less safe than others? Has anyone gone on this kind of trip and have any advice or ideas or tips?