The funding is based on conditions including detailed development and financial plans and leasing a super-hanger at St Athan.
The firm will build its new DBX model from 2020.
The new plant will employ 750 highly-skilled workers.
The information commissioner instructed the Welsh Government to release the details of the financial support given to the company.
Ministers had initially refused to make the figure public.
This was challenged through the Freedom of Information Act by businessman Tom Gallard.
The Â£5.8m is "repayable business finance" according to the details released by the Welsh Government.
Wales beat off more than 20 other countries to secure the deal, which was announced early last year.
Mr Gallard, who runs a tech company, said: "I'm happy the Welsh Government has now released this information. It is an important principle that we must know how public funds are being spent."

Ministers approved the grant despite warnings from senior civil servants about the charity's finances.
Mr Cameron said the grant had given the charity a final chance to restructure and to "continue its excellent work".
Meanwhile, the charity's supporters have taken part in a march in London.
About 150 people walked from the charity's former centre to Parliament to raise awareness of the vulnerable people who used the support service.
Kids Company closed on Wednesday after ministers said they wanted to recover the £3m grant.
The Cabinet Office said it believed conditions attached to the use of the money had not been met - but the charity's founder has repeatedly rejected claims of financial mismanagement there.
Speaking to Channel 4 News, Camila Batmanghelidjh said she had "confirmed in writing" with Cabinet minister Oliver Letwin last year that he had agreed to find £20m for the charity.
But she said: "I honestly believe that they didn't want us to go under before the election because it wouldn't look good, and then post-election, I think, they were prepared for it to go under."
Ms Batmanghelidjh said the "necessary, genuine, and deep-thinking commitment to solve the problem of large-scale childhood maltreatment in this country is not there inside the current government".
A government spokeswoman said: "Successive governments have supported Kids Company over the last seven years to help it deliver services for vulnerable young people and so we are disappointed it has been unable to move to a sustainable financial position."
Speaking earlier, during a visit to the National Citizen Service - a social enterprise that helps teenagers with training and life skills - Mr Cameron said he was "sad" the charity had "come to an end".
He said: "The government thought it was the right thing to do to give this charity [Kids Company] one last chance of restructuring to try and make sure it could continue its excellent work.
"Sadly that didn't happen, not least because of the allegations that were made and private donors withdrawing their money.
"But I think the government was right to say 'Let's have one last go', to try and keep this charity going, given the excellent work it's done for so many young people."
It provided services including counselling, walk-in centres with hot meals and help with housing and healthcare for children and young people whose parents were often unable to care for them.
It had branches in London, Bristol and Liverpool and employed 600 paid staff, as well as working with a pool of about 8,000 volunteers and 500 students.
What went wrong at Kids Company?
'It feels like we've lost a parent'
Kids Company has also faced accusations by former staff that the charity failed to deal with allegations of serious incidents, including sexual assaults.
The Metropolitan Police's sexual offences, exploitation and child abuse unit is investigating a number of allegations of crime involving the charity.
Ms Batmanghelidjh told Channel 4 News: "From what we have been told, there this no case to answer so far on the part of Kids Company."
Local Government Association spokesman David Simmonds said that councils in the three areas where Kids Company operated were "working hard to identify all vulnerable children connected to the charity".
He added: "Kids Company has a duty of care to ensure all children known to them who require support are referred to the appropriate council as soon as possible."
Aston Martin is receiving Â£5.8m in financial support from the Welsh Government as part of the deal to bring the luxury carmaker to the Vale of Glamorgan, it has been revealed.
[NEXT_CONCEPT]
Prime Minister David Cameron has defended the government's decision to give charity Kids Company £3m one week before its closure, saying it had been right to give it "one last chance".