Configure Amazon linux workspace for web development

Himanshu Pratap
3 min readJan 23, 2022


Amazon WorkSpaces are easily provision cloud-based desktops that allow end-users to access applications and resources. Amazon EC2 is Scalable, pay-as-you-go compute capacity in the cloud.

Amazon EC2 can be classified as a tool in the “Cloud Hosting” category, while Amazon WorkSpaces is grouped under “Virtual Desktop”.

Amazon workspace can be of windows type or linux type. This article is about configuring your amazon linux workspace so that it is ready for full stack web development.

  1. Login in to your workspace using Amazon workspace client application. The application can be download from link -

2. Check logged in user and os details

$ whoami
$ uname -a

For web development i require following tools to be installed:
java, postgresql, node, vs code and eclipse.

Steps to install & configure these tools are as follows.

3. Install/Configure Java 11

By default , two version of java comes on the linux workspace.
java-1.8.0-openjdk 1.8

You can check out difference between openjdk and amazon-corretto version at this stackoverflow post-

$ sudo amazon-linux-extras install java-openjdk11
$ sudo alternatives --config java

4. Install Postgresql 13 server

 Add PostgreSQL Yum Repository$ sudo tee /etc/yum.repos.d/pgdg.repo<<EOF
name=PostgreSQL 13 for RHEL/CentOS 7 - x86_64
Run system update
$ sudo yum update
Install PostgreSQL
$ sudo yum install postgresql13 postgresql13-server
Initialize the PostgreSQL Database
$ sudo /usr/pgsql-13/bin/postgresql-13-setup initdb
Enable and Start PostgreSQL Service
$ sudo systemctl start postgresql-13
$ sudo systemctl enable postgresql-13
$ sudo systemctl status postgresql-13
Change os user postgres password
$ sudo passwd postgres
change the Admin database password
$ sudo su - postgres
$ psql -c "ALTER USER postgres WITH PASSWORD 'your-password';"
Permit login to database through username and password instead of peer. (Optional)
$ sudo vim /var/lib/pgsql/13/data/pg_hba.conf
# "local" is for Unix domain socket connections only
local all all scram-sha-256
# IPv4 local connections:
host all all scram-sha-256
# IPv6 local connections:
host all all ::1/128 scram-sha-256
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all scram-sha-256
host replication all ::1/128 scram-sha-256
Allow postgresql-server to listen all ip address (Optional)
$sudo vim /var/lib/pgsql/13/data/postgresql.conf
Restart services and check the version
$ sudo systemctl restart postgresql-13
$ psql -V

5. Install Nodejs 16

$ curl -sL | sudo -E bash -
$ sudo yum install -y nodejs
$ node -v

6. Install Microsoft visual studio code

$ sudo rpm --import
$ sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=\nenabled=1\ngpgcheck=1\ngpgkey=" > /etc/yum.repos.d/vscode.repo'
$ sudo yum update
$ sudo yum install code
$ code -v

7. Install Eclipse IDE

$ cd ~/Download
$ wget
$ tar -xvf eclipse-inst-jre-linux64.tar.gz
$ chmod -R eclipse-installer
$ cd eclipse-installer/
$ ./eclipse-inst

Thats’s it.