Documents released by the National Security Archive show that the CIA expected the Cuban people to welcome a U.S.-sponsored invasion, spontaneously rising up against the Castro regime. It expected Cuban military and police forces to refuse to fight against the CIA's 1400-man mercenary invasion force. President Kennedy had withdrawn support for the invasion at the last minute by canceling several bombing sorties that could have crippled the entire Cuban Air Force. The brief military invasion ended in total failure and quickly became a foreign policy debacle for Kennedy. He had approved the plan just three months into his presidency.  ...
Many theories are offered for the failure of the operation. Some argue that Kennedy's last minute decision to withdraw air support caused the invasion to fail, though this has been more recently discarded.  The likely cause of the failure, was that the Americans misjudged Cuban support for Castro.  They had believed the testimonies of the Cuban exiles, who told them that Castro was not well supported by the Cuban people, when in fact, Castro enjoyed wide support at this time. The idea that Cubans would rise up against Castro, was simply a misconception on the part of the Eisenhower, and then Kennedy administrations. As well, the CIA-trained force of 1,400 armed only with light-arms, faced a Cuban force of tens of thousand armed with tanks, and artillery.  In addition, the covert placement of dozens of Cuban intelligence officials in the invasion force gave the Cuban government detailed information on the operation. 
The parallels with our Iraq experience are striking. No doubt many Cubans, and many Iraqis, did have positive attitudes toward the U.S. and did welcome U.S. help in removing a dictator. Overall, however, invasion appears to be a problematic mechanism for achieving this goal.
An alternative approach in the Cuban case is for the U.S. to end the longstanding trade embargo. This embargo probably has small effects on the Cuban economy, since most other countries still trade with Cuba. But the embargo is a key political tool that helps Castro demonize the U.S. in the eyes of many Cubans. Free trade would promote a broader view of the U.S. among Cubans and likely undermine support for Castro's socialist policies.
Again there is a parallel with Iraq. The UN-imposed sanctions perhaps affected the Iraqi economy more than the U.S. trade embargo of Cuba. But the publicity value to Saddam Hussein of portraying the world as anti-Iraq may have more than compensated in helping him maintain his totalitarian regime.