Install Go on AWS EC2
Getting started with Go: Part 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Check out my series on Automating Cybersecurity Metrics. The Code.
🔒 Related Stories: Golang | AWS Security
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*qvAqnv7X8rdI8Ni2YTcYjg.png)
In Part 1 of these series I explained why you might want to use Golang and how it may help with your application security. Now I’m going to install Go.
1. Decide where to install Golang
I am going to use a virtual machine on AWS (an EC2 instance) running the Amazon Linux 2 operating system to test this out. After each command below I will show the actual command and output produced when the I executed the command.
Here are the steps to launch and run an EC2 instance if you are not familiar. My security class labs have much more detailed steps to show people how to run and connect to cloud instances but hopefully these steps will be enough for anyone who is new to running a virtual machine in the cloud.
Note: If you are not using an Amazon EC2 instance, follow the Instructions for your Operating System (Mac, Windows, or some other form of Linux that doesn’t support the commands I’m going to show you).
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*MNaoXcQB1kDd_6UN2cKEPw.png)
2. On EC2 Linux, you can run the following command:
sudo yum install golang -y
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*a5AtlD28IQPxh7JtbOIPbw.png)
3. Type the following command to ensure go is installed correctly:
go version
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*SnLHPTcXuGLaNIT8ccXQMA.png)
How easy was that?
4. Try out the tutorials
If you want to play around with this introductory tutorial you can run the commands listed on this page:
5. Consider building an automated developer workspace
The next thing I’m going to do is add these commands to my scripts that create my cloud development environment. One of the benefits of developing in the cloud is that you can create images to launch new virtual machines in an automated fashion. That’s something I teach in cloud security class and is beyond the scope of this blog post. I also cover security fundamentals in my cybersecurity book which are applicable to developing and deploying these types of systems.
Some of the benefits of automated workspaces include the ability to simply launch a new one if something goes wrong, and the ability to have your automation automatically update all the software when you update your image. When using virtual machines in the cloud you want to secure the network properly, and create images that don’t store any credentials on them.
In my next blog post I’m going to take a look at some of the fundamental constructs of the Go programming language. I’m presuming you have a bit of programming experience and are not a brand new developer in this series. If you are, try the tutorials above before moving on to my next post.
Follow for updates.
Teri Radichel | © 2nd Sight Lab 2020
About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*H9Ew1KCl-29nZiPR.jpeg)