Install Go on AWS EC2
Getting started with Go: Part 2
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.
Tutorial: Getting started with Amazon EC2 Linux instances
Use this tutorial to get started with Amazon Elastic Compute Cloud (Amazon EC2). You'll learn how to launch, connect…
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).
2. On EC2 Linux, you can run the following command:
sudo yum install golang -y
3. Type the following command to ensure go is installed correctly:
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:
Tutorial: Get started with Go
In this tutorial, you'll get a brief introduction to Go programming. Along the way, you will: Install Go (if you…
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.
Teri Radichel — Follow me @TeriRadichel
© 2nd Sight Lab 2020
Want to learn more about Cloud Security?
Check out: Cybersecurity for Executives in the Age of Cloud.
Cloud Penetration Testing and Security Assessments
Cloud Security Training
Virtual training available for a minimum of 10 students at a single organization. Curriculum: 2nd Sight Lab cloud Security Training
Have a Cybersecurity or Cloud Security Question?
2020 Cybersecurity and Cloud Security Podcasts
2020 Cybersecurity and Cloud Security Conference Presentations
DOM XSS Attacks and Prevention ~ IANS November 2020 Webinar
Prior Podcasts and Presentations
Azure for Auditors ~ Presented to Seattle ISACA and IIA
OWASP AppSec Day 2019 — Melbourne, Australia
Bienvenue au congrès ISACA Québec 2019 — Keynote — Quebec, Canada (October 7–9)
White Papers and Research Reports