Not exactly. Castro's revolution "succeeded" on New Year's Day of '59. In February of '60 Castro signed an agreement with Russia for large amounts of credit. Eisenhower's administration started the ball rolling on the overthrow of Castro in 1960. Kennedy took office in January of 1961 and enthusiastically continued the work of the Eisenhower administration. By 19 April 1961 the debacle was over and the US was shamed before the entire world.
Now, had Kennedy NOT authorized the Bay of Pigs operation, or had he supported it as he said it would and had it thus succeeded would their have been Russian missiles in Cuba?
I think not; you're welcome to your own opinion.
Had Bay of Pigs succeeded, the Russian missile issues is a non-starter. Lack of US support insured that it would not.
Had it not occurred, I'm doubtful Castro would have let the Russians place missiles in Cuba. He had to know that with Russian nukes in Cuba he was giving up a huge part of his sovereignity to Moscow. He was pretty sharp, credit where credit is due. He knew it was more advantageous for Cuba to continue to play the US off against the USSR. Bay of Pigs made that play impossible for him, though.
Nonethe less, Bay of Pigs was a Kennedy administration mistake of incredible proportions. Who knows if the embarassment they suffered there led directly to involvement in Viet Nam, thinking to restore their image?
Just my opinion.