ASG Lifecycle Hooks Flashcards

1
Q

What are ASG Lifecycle Hooks?

A

Lifecycle hooks are features in AWS Auto Scaling that allow you to pause an EC2 instance at key points during its launch and termination processes, providing an opportunity to perform custom actions.

Example: Pause instance to perform software installation before it starts handling traffic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the key transition points where lifecycle hooks are used in ASG?

A
  • Launch Transition: Hooks that pause the instance after it launches but before it is put into service.
  • Terminate Transition: Hooks that pause the instance just before it is terminated.

Example: Pause instance post-launch for software configuration updates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Heartbeat Timeout in ASG lifecycle hooks?

A

Heartbeat Timeout is the duration that the instance remains in the paused state before the hook times out. If the hook times out, the instance proceeds to launch or terminate, depending on the hook type.

Example: Set a Heartbeat Timeout of 5 minutes for software installation completion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are practical uses of ASG lifecycle hooks?

A
  • Software Installation: Configure and install necessary software before the instance starts handling traffic.
  • Configuration Updates: Apply critical updates or configuration changes before an instance becomes active.
  • State Management: Properly manage the connection draining and deregistration from load balancers before an instance is terminated.

Example: Update security configurations before instance activation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do lifecycle hooks handle notifications?

A

ASG can send notifications via Amazon SNS when lifecycle hooks are triggered, allowing for automated or manual interventions to manage the state of instances effectively.

Example: Receive an SNS notification for manual intervention during software installation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly