The deadline date is the date by which AAMC has to receive your application. But if there are any questions about your application during processing and they return it to you for any corrections, then, according to them, you have missed the deadline!
So as long as you submit it by the deadline date and they process it without any errors you are fine.
AMCAS Deadlines
As far as the secondary deadlines are concerned, it is between you and the college that you are applying to.
For instance, I submitted my AMCAS Oct 15, probably will be processed around Nov 15. One school has a secondary deadline that is Nov 15. I am going ahead and sending the secondary even though they have not received my primary yet.