The Cocos (Keeling) Islands are an Australian external territory in the Indian Ocean, southwest of Sumatra, halfway between Australia and Sri Lanka.