Skip to content

Instantly share code, notes, and snippets.

@ekardon
Created January 11, 2022 13:49
Show Gist options
  • Save ekardon/efce0290152c8bf5ce0f6ec2cc810af3 to your computer and use it in GitHub Desktop.
Save ekardon/efce0290152c8bf5ce0f6ec2cc810af3 to your computer and use it in GitHub Desktop.
Personel Workspace on Amazon EC2 instance

So I have been trying to create a workspace for myself to develop Django project using postgresql 14.1, python3.9.5 and PyCharm.

Amazon has a product for this "Amazon Workspaces" and its free ties provides 40 hours/month free usage over 1 year. However that's not enough to develop a software or whatsoever. So i wanted to figure out how I can create a workspace on my own using "Amazon EC2" instances which has 750 hours/month over a year.

Here, I will share my trial and error results.

Amazon Workspaces: What is it? Is it free?

Amazon Workspaces is a neat platform where you can use a cloud desktop instance in anywhere. There are multiple client apps for almost any platform (Windows, Linux, MacOS, Android, iOS, web client)

Free Tier of Amazon Workspaces provide the following specs

  • 2 vCPU
  • 4GB RAM
  • 80GB Root Volume
  • 50GB User Volume
  • 40 hours per month cumulatively (meaning all instances' total usage)

For OS:

  • Amazon Linux 2 (Protocols: PCoIP)
  • Windows 10 (Server 2016 based) (Protocols: PCoIP, WSP)
  • Windows 10 (Server 2019 based) (Protocols: PCoIP, WSP)

P.S: PCoIP vs. WSP

I have tried Windows 10 (Server 2019 based) (WPS) version, and I was very happy with the quality I got. Setup is quite simple and windows client doesn't require admin privilages to install (which is a plus for me). Connecting through web client requires additional configuration, but apart from that its quite straightforward.

Now this is all good but 40 hours is not enough. Thus, I wanted to create similar environment with Amazon EC2 instances.

Amazon EC2

Amazon EC2 instances are generally for deploying websites etc. They are not meant for using as an everyday-use-PC, though they can be. Here I found a nice tutorial on how to do it with Amazon EC2 and nice-dcv.. However, this tutorial is for paid options, such as EC2 specs and OS image used are both pay as you go style products.

My intention here is to create a free tier alternative to above tutorial. Let's start with learning about Amazon EC2 Free Tier Specs:

  • 1 vCPU 2.5Ghz
  • 1GB RAM (also there is old t1.micro instance which has 0.6GB RAM)
  • EBS only storage
  • 750 hours per month Linux, RHEL, SLES
  • 750 hours per month Windows
  • t2.micro or t3.micro instance

For OS there are multiple solutions, more than Amazon Workspaces:

  • Amazon Linux 2 AMI - Kernel 5.10
  • Amazon Linux 2 AMI - Kernel 4.14
  • Debian 10
  • Red Hat Enterprise Linux 8
  • SUSE Linux Enterprise Server 12 SP5
  • SUSE Linux Enterprise Server 15 SP3
  • Ubuntu Server 16.04 LTS
  • Ubuntu Server 18.04 LTS
  • Ubuntu Server 20.04 LTS
  • Microsoft Windows Server 2012 R2 Base
  • Microsoft Windows Server 2016 Base
  • Microsoft Windows Server 2016 Base with Containers
  • Microsoft Windows Server 2019 Base
  • Microsoft Windows Server 2019 Base with Containers
  • Microsoft Windows Server 2022 Base
  • Microsoft Windows Server 2022 Base with Containers

Amazon EBS

Amazon EBS is general purporse storage generally used by EC2 instances. Storage is active only when instances are active. It's not possible to reach them unless connected intance is running.

For free tier:

  • 30 GB of Amazon EBS: any combination of General Purpose (SSD) or Magnetic
  • 2,000,000 I/Os (with EBS Magnetic)
  • 1 GB of snapshot storage

img

P.S: On Billing page, I couldn't find any metrics related to EBS, such as storage size. This may be bc it takes time to update data. At the time i write this article, it's still less than 24 hours since I launched the first EC2 instance.

P.S.2: 30GB is cumulative, BUT how cumulative I did not understand. Is it cumulative of actively used instances size or all created instances total size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment