Pronunciation is the only determining factor.
If the noun or adjective being used starts with a VOWEL SOUND, then it should be preceded by "an." Here are some examples:
An apple, an argument, an uncle, an old man, an amazing story, an autobiography.
If the noun or adjective being used starts with CONSONANT SOUND, then it should be preceded by "a." Here are some examples:"
A book, a record, a candlestick, a unicorn (note that a hard "u" is pronounced as if it began with a "y" as YOO-ne-corn), a wonderful idea, a standing ovation.
We english native speakers still can't agree on historic. (a historic vs. an historic) I vote for "a historic event"