Auto Scaling lifecycle hooks enable you to perform custom actions as Auto Scaling launches or terminates instances. For example, you could install or configure software on newly launched instances, or download log files from an instance before it terminates.
Reference:
http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html