BENGALURU, Sept 1 (Reuters) - Indian shares hit all-time highs for a third straight session on Wednesday after data showed that the economy grew more than 20% in the April-June quarter.

The blue-chip NSE Nifty 50 index was up 0.23% at 17,171.90 by 0512 GMT, after having risen to 17,225.75. The benchmark S&P BSE Sensex traded 0.31% higher at 57,728.16 after scaling to 57,918.71.

The record high levels for both the indexes come a day after they clocked their fourth straight monthly gain in August in a market flush with liquidity and solid global cues.

Data on Tuesday showed the Indian economy rebounded in the April-June quarter even as a devastating second COVID-19 wave swept the country, boosted by a surge in manufacturing and higher consumer spending.

That was in line with a Reuters poll forecast of 20.0%, compared with a record contraction of 24.4% in the same quarter a year earlier.

"(The) GDP (data) is indicating that the economy is recovering. We have to wait and watch how things evolve on factors like chip shortages, monsoon and COVID-19 cases," said Anita Gandhi, Director at Arihant Capital Markets, Mumbai.

"Strong liquidity is helping stock valuations which are bit expensive. As long as liquidity remains robust, supported by economic revival, stocks will continue their upward momentum."

Axis Bank Ltd and Bajaj Auto Ltd were among the top performers on the Nifty 50, adding 3% and 1.6%, respectively.

Bharat Heavy Electricals Ltd rose as much as 4.4% after it bagged work orders worth $1.48 billion from NPCIL.

Car maker Maruti Suzuki fell 1.2% after it warned that vehicle production in September will tumble by 60% due to a chip shortage.

Investors are now eyeing August sales data from automakers due during the day.

Asian shares gave up some of their recent gains on worries about slowing global growth. ($1 = 73.0250 Indian rupees) (Reporting by Rama Venkat in Bengaluru; editing by Uttaresh.V)