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)

Scaling on schedule

Instead of scaling manually, you might want to Scale-Up your fleet proactively for the given duration. This is a possibility if you have an Auto Scaling Group. You can schedule an action for the given date and time to increase or decrease the fleet size. This can be done using Write-ASScheduledUpdateGroupAction.

PS C:\> Write-ASScheduledUpdateGroupAction -AutoScalingGroupName WebAppASG -ScheduledActionName "MyWebAppScheduleActionUp" -StartTime "2017-07-10T12:06:00Z" -DesiredCapacity 4

In this example, the Auto Scaling Group fleet size is scheduled to increase to the desired capacity of 4 on 10-Jul-2017 at 12:06 PM GMT/UTC. Note that, you have to always specify the time in GMT/UTC. If you feel that you require this fleet size just for an hour, you can schedule the Scale-In an action as per the following:

PS C:\> Write-ASScheduledUpdateGroupAction...