I thought what else we could do with it, and I have got an idea to use it as AWS Automation Bot to perform simple tasks. I have created a set of instructions for a Bot using PowerShell script which we could use to perform the following tasks instantly instead of doing it from AWS console.
Getting instance details using instance name.
Getting attached volume details using instance name.
Getting list of the available snapshots for a instances using instance name.
Getting the console screenshot for troubleshooting using instance name.
Getting the console log for troubleshooting using instance name.
I personally can’t imagine supporting a big infrastructure without introducing automation and to automate something you have to use command line. If you are more into Windows and started working on AWS for your clients, then I assume that you would love to start managing AWS using AWS PowerShell Module like I do. AWS Console is really good and informative but when it comes to bulk activity I am always depending on PowerShell.
There is a very good documentation created by Amazon for AWS PowerShell, you will get the basic help for all the available PowerShell cmdlet from here. It will be very much helpful for you to start working on AWS PowerShell, but unfortunately when it comes to using filter available for those cmdlet, you won’t be able to find any good example. Using filter on a AWS cmdlet will be a smart move and it also reduce the total execution time. Initially I also struggled to get this working due to lack of examples, but later I figured it out, and now I always try to utilize filter and I am writing this to you help you understand how easily we could use this.
Some of the sample, hope this will help you.
Extract the list of the snapshots under your ownership.
This script, I am using filter to identify the snapshots mapping with instance
Cleanup disabled accounts from groups is one of the most boring job, and also take lots of time. Manually it’s almost impossible to maintain. Recently I had a request to perform such task for many groups, so, I wrote a script to do it automatically on behalf of me. I am now sharing this script, hoping this might help you as well.
This script will do following task automatically.
Get the members of a group.
Identify only users.
Identify disabled users.
Check every disabled users group memberships.
Remove the disabled users from that group.
Generate a report with status (success / failure).