Tag Archives: notes

AWS Solutions Arch – Compute Services – Lifecycle Hooks

Lifecycle Hooks

Overview

You can add a lifecycle hook to your Auto Scaling group so that you can perform custom actions when instances launch or terminate. For example, while your newly launched instance is paused, you could install or configure software on it.

Each Auto Scaling group can have multiple lifecycle hooks. However, there is a limit on the number of hooks per Auto Scaling group.

How Lifecycle Hooks Work

When Auto Scaling responds to a scale-out event, it launches one or more instances. These instances start in the Pending state. If you added an autoscaling:EC2_INSTANCE_LAUNCHING lifecycle hook to your Auto Scaling group, the instances move from the Pending state to the Pending:Wait state. After you complete the lifecycle action, the instances enter the Pending:Proceed state. When the instances is fully configured, they are attached to the Auto Scaling group and they enter the InService state.

When Auto Scaling responds to a scale-in event, it terminates one or more instances. These instances are detached from the Auto Scaling group and enter the Terminating state. If you added an autoscaling:EC2_INSTANCE_TERMINATING lifecycle hook to your Auto Scaling group, the instances move from the Terminating state to the Terminating:Wait state. After you complete the lifecycle action, the instances enter the Terminating:Proceed state. When the instances are fully terminated, they enter the Terminatedstate.

You can perform a custom action using one or more of the following options:

  • Define a CloudWatch Events target to invoke a Lambda function when a lifecycle action occurs. The Lambda function is invoked when Auto Scaling submits an event for a lifecycle action to CloudWatch Events. The event contains information about the instance that is launching or terminating and a token that you can use to control the lifecycle action.
  • Define a notification target for the lifecycle hook. Auto Scaling sends a message to the notification target. The message contains information about the instance that is launching or terminating, and a token that you can use to control the lifecycle action.
  • Create a script that runs on the instance as the instance starts. The script can control the lifecycle action using the ID of the instance on which it runs.

By default, the instance remains in a wait state for one hour, and then Auto Scaling continues the launch or terminate process (Pending:Proceed or Terminating:Proceed). If you need more time, you can restart the timeout period by recording a heartbeat. If you finish before the timeout period ends, you can complete the lifecycle action, which continues the launch or termination process.

Configuration

You can create lifecycle hooks using the put-lifecycle-hook command. For more information on this command – click here.

For more information on Compute services in AWS – see my course at CBT Nuggets.

For a list of course services – see this post.

70-742 Additional Notes – The Remote Access Server Role and WAP

70-742

The important Remote Access server role incorporates the following technologies:

  • Remote Access Service (RAS)
  • Routing
  • Web Application Proxy (WAP) 

The Web Application Proxy is the most relevant role service above for the 70-742 exam and it explicitly makes the exam blueprint.

Remember the Web Application Proxy is to provide reverse proxy functionality for Web applications that exist inside your corporate network. What this means is that it permits outside users (on any device) to access these Web applications from outside your network.

WAP pre-authenticates access to your Web applications using Active Directory Federation Services (AD FS) and can also function as an AD FS proxy.

To install this powerful service, use the Add Roles wizard and target the RAS server role – or use PowerShell as follows:

Install-RemoteAccess -VpnType SstpProxy

Some features of WAP that are new in Server 2016 include:

  • Preauthentication for HTTP Basic application publishing – this allows mobile devices to use ActiveSync with Exchange
  • Wildcard domain publishing of applications  – this simplifies integration of services like SharePoint that have many applications in a domain to be published
  • HTTP to HTTPS Redirection
  • HTTP application publishing using pass-through preauthentication
  • Remote Desktop Gateway Apps
  • Better debug logging
  • Admin Console UI improvements
  • Propagation of client IP address to backend applications
Microsoft
PLEASE VISIT OUR SPONSOR!