- The script will need to be written for Windows (server 2016) You can use Powershell+AWS CLI or Python.
- The script will be fully tested on Windows before by the developer before the project is finished.
- Full step by step documentation will be required from the developer for how to install every single requirement. (for example, Install python vXXX , add system variables, full commands on installing aws cli, python etc) I will be replicated this to other windows Machines so this needs to be fully detailed.
- It will be called with a .bat (CMD) in task manager on an interval.
How the script will work: The function of this script is to renew the elastic EC2 IP.
1) Dissociate current IP (IF there is not an IP associated it will need to Allocate and Associate)
2) Release IP (If there was an association, it will need to replace that IP)
3) Allocate IP
4) Assign IP
5) Validation step: Check to see if there are any unassociated IP's on the aws account or if there are currently more than 1 elastic IP currently assigned to the instance defined.
If 1 or more of these conditions are true and the script did not do its job correctly so it will need to releases all the IP rerun the script until all ONLY 1 IP is associated with the instance and there are no unassociated IP's ** This saves extra billing costs unnecessary to incur**.
I will change the 3 variables within the script in a text editor and run it on many different windows machines in windows task manager with a .bat. The 3 variables are:
Access Key ID: , Secret Access Key: Instance ID
(As the developer, make sure you do not code for predefined variables such allocation ID or it will not work on other accounts/instances)