Book Image

AWS Tools for PowerShell 6

By : Ramesh Waghmare
Book Image

AWS Tools for PowerShell 6

By: Ramesh Waghmare

Overview of this book

AWS Tools for PowerShell 6 shows you exactly how to automate all the aspects of AWS. You can take advantage of the amazing power of the cloud, yet add powerful scripts and mechanisms to perform common tasks faster than ever before. This book expands on the Amazon documentation with real-world, useful examples and production-ready scripts to automate all the aspects of your new cloud platform. It will cover topics such as managing Windows with PowerShell, setting up security services, administering database services, and deploying and managing networking. You will also explore advanced topics such as PowerShell authoring techniques, and configuring and managing storage and content delivery. By the end of this book, you will be able to use Amazon Web Services to automate and manage Windows servers. You will also have gained a good understanding of automating the AWS infrastructure using simple coding.
Table of Contents (17 chapters)

Lifecycle hooks and cooldown

We have seen that health check attributes specified on the load balancer decide whether the EC2 instance is healthy or not. As soon as a health check has been passed, the load balancer starts sending traffic to the EC2 instances, irrespective of whether the application hosted on the EC2 instances is fully configured and installed or not. Often, deploying code and applications take time, and you do not want the load balancer sending traffic until it is fully ready. There is no way for a load balancer to understand whether the EC2 instances are fully configured during bootstrapping. This is where lifecycle hooks play a major role. Lifecycle hooks give us a way to perform actions before an EC2 instance is in InService state, or before an EC2 instance is in Terminated state.

During an EC2 instance launch time, when you add a lifecycle hook to the Auto...