World champions Spain face Uruguay, Tahiti and the winners of the African Nations Cup in Group B after the draw in Sao Paulo.
Six Brazilian cities will stage the tournament between June 15 and 30 next year in what is a dress rehearsal for the World Cup in the same country the following year.
Capital city Brasilia will stage the Confederations Cup opener and Rio de Janeiro's Maracana Stadium will host the final.
Newly appointed coach Luiz Felipe Scolari will lead the host nation which is bidding to win a third consecutive title after victories in 2005 and 2009.
"We have the mission to win the Confederations Cup on the field, but we also have the obligation to be victorious off the field," said Brazil President Dilma Rousseff in quotes reported on the FIFA website.
"We are preparing to organise an extraordinary Confederations Cup. We will show the world in 2013 that Brazil has all the conditions to host the 2014 World Cup, and that it will be the best organised and the most festive of all time."
Sao Paulo will not host Confederation Cup matches because of delays in the project to build a new stadium but the city will stage the World Cup opener in 2014.
FIFA has expressed confidence in the ability of Brazil to stage the World Cup with the Olympics also set to be in Rio in 2016.
"It's a question of trust and confidence when the World Cup is going to a country," FIFA President Sepp Blatter said.
"The football community, they trust and they are confident with the organisation of Brazil."