The peninsular part became independent on August 31 , 1957 as the Federation of Malaya .
Malaya was restructured as the Federation of Malaya in 1948 , and achieved independence on 31 August 1957 .