Coding in the Cloud with AWS

Give your hardware (and sanity) a break by letting the cloud do the work for you

Chaz Frazer
5 min readApr 14, 2021
Cloud Computing taking the jobs of our local machines!

Amazon Web Services (alongside alternative options such as Azure, Google Cloud, and others) offer unprecedented access to virtual, fully remote processing power by harnessing virtual machine clusters and remote servers to handle enormous amounts of data, as well as process tasks and data science models that would otherwise bog down your local computer to a crawl. Instead of being left with nothing to do while your models run in the background for 12 hours, why not utilize cloud-based services to handle it for you?

I came into the Data Science program at Flatiron already utilizing AWS (as well as Paperspace) and Parsec for cloud-based gaming. This created the ability to utilize the physical locations of Amazon servers throughout the world to bypass delay-based net code by implementing a peer-to-peer connection with the server acting as an official waystation between players, minimizing lag to the levels of games with properly implemented rollback network services.

What can’t this service do?!

Computing and processing power for complicated Data Science models can be comparable — and even surpass — that of hardware-intensive games that put a strain on processors and GPUs. This article is here to help guide you through the setup process of creating an account and selecting the right virtual hardware package for your cloud computing needs.

Pricing

AWS pricing is pretty straightforward. As an individual user, it costs me about $0.80 an hour to run my server, and storage for my virtual HDD as well as image storage (we’ll get to that later) costs me about $1.50 per month. Even with gaming for 2–3 hours each day in the cloud, I only pay about $10–15 monthly.

Check out detailed pricing options at this AWS site.

Setting Up Your AWS Account

Before being able to select the right virtual instance (the official AWS term is Elastic Instance or EC2) you need to first create an AWS account. In the event you already have an Amazon account (prime, kindle, etc.), you can go ahead and use that login information to sign-up for the service.

Once you’ve gone ahead and signed up, you will also need to request an increase of your CPU core limit, as this will give you the processing power necessary for your big-data needs. Note that it can take up to 24 hours for Amazon to approve your request, although this is only a formality.

Create your AWS account on this splash screen

The process for doing this is quite robust, and it is easy to get lost in the jungle of menus splattered everywhere. Don’t worry, however, as I’ve also included a great tutorial at the end that can guide you through the setup process.

Search for ‘Service Quotas’ to begin the upgrade process.

After your CPU core limit request is approved, next is creating an Nvidia GPU Amazon Machine Image (AMI). This step is crucial, otherwise, you would need to log in as the core root user whenever running your server, which in itself carries huge data privacy and security risks. The AMI lets you access the server as an authorized administrative contributor (it’s like being on a team with yourself!).

Highlighted is where you will request the upgrade to your computing limit (free of charge).

Once you have your Nvidia GPU selected (you can never have too much power, so it’s okay to be liberal here), the next step is to launch the server from the AMI. An important note: AWS has recently launched Mac-based EC2 instances, powered by the Amazon Nitro System. The Mac-based EC2 instances give you the choice of macOS Mojave (10.14), macOS Catalina (10.15), and macOS Big Sur (11.2.1).

Launching your instance will include downloading a remote access API (need to do this every time you log in if using an AMI), and utilizing a randomly generated password. Although this step is annoying, the added security makes it worth it IMO.

The EC2 Dashboard is your homepage where you’ll control everything about your instance.

Lastly, once you are inside your virtual machine and everything looks good, be sure to create an image so that you can boot in the future from an already configured state. AWS does not by default save your cloud settings and preferences on the AMI, so making an image and saving your work upon termination (always terminate your instance when done working!) is the one way you have to keep your settings intact and avoiding having to this setup process every time you log in to your instance.

Conclusion

That's it! Be sure to check out the detailed tutorial below in resources for step-by-step instructions on setting up an instance. Ignore the parts about Parsec, as that is specifically for online gaming, but other parts, including the GitHub repos in the video description, have code for optimizing Nvidia GPU settings and web access ports that can be beneficial for your processing and tuning needs.

Happy Cloud Computing! Your local machine may need a new line of work…

--

--

Chaz Frazer

Data Scientist/Esports Analyst/Linguist/Japanese Interpreter: I do a lot in the intersection of gaming and data, helping esports grow.