Bitten and stopped by the Python script…
As painful as this looks, it was more painful knowing that it was not as bad as I was making it to be. Let me walk you through what I did to complete writing a python script that stopped 3 EC2 instances. Yes, I made some mistakes along the way but learned quick once I noticed my errors.
First, I had to create 3 separate ec2 instances in AWS. All labeled as week 14project.
Second, I had to create a python script to stop each one…as you see below is when I started to pull my hair out(an I'm bald 3/4% of the time lol). For time sake, let say I did this totally wrong and was stuck for quite some time. Below you will see all 3 instances in the script thinking it would stop all three but this did not work. This only stopped one EC2 and not all.
With that said, this script worked for each EC2 with no issues.
After all trial and unnecessary self induced pain, I was able to successfully stop all instances.
lastly I was able to successfully push to my GitHub.
There you have it! I was successfully able to create a python script that stopped all 3 EC2 instances and pushed all those to my GitHub account…That python bit was not so bad after all. note, there are several ways in doing what I just did and many will find other solutions but I found this one to be a very simple effective way. Hope it helped and thanks for the read.
Python not so bad after all….