You can and should apply for the eTA as soon as you start planning your travel, as early as a year to a few months in advance.