Two people were killed when a 7.1-magnitude earthquake shook Peru on Sunday, according to a regional governor.