Python program in AWS EC2 Windows instance

Abimuktheeswaran Chidambaram
3 min readMar 1, 2024

This chapter shows how to install the Python application and write and execute the program in an AWS EC2 Windows instance.

Requirements:

1. An AWS account

2.EC2 windows instance with 30GB. Optionally you can add 100GB of EBS volume like a physical hard drive. Both are eligible in the free tier. But there is a time limit for this.

How to launch the EC2 Windows instance

  1. When creating the EC2 Windows instance, you create it in VPC, subnet, and security groups.

The security group should be like this and start to launch the instance.

  1. In the “RDP Client” tab, click the “Download the remote desktop file”. After that, you want to get the password. So only, you can connect the instance via RDP.

2. click the Get Password to decrypt the password which is in .pem format.

3. You can download the key pair for your security when creating the instance. Then upload the .pem key pair from the downloaded location. Finally, click the Decrypt Password

4. After decrypting the password your Username and password look like this.

Note: save the login details (username and password) in a private location. Once you lose, you cannot get the details and launch the instance.

Once you connect the instance, your instance home screen looks like this.

Attach EBS volume for this instance like setting “ D drive in our local computer”. Initially, it looks like this, Right-click the Disk1 area, and click the online.

You created 20GB of your local volume D:

download the Python application via browser and install it in C drive. It looks like this. you can see the sample file in the name of hello

You can write the program in Notepad (or) IDLE shell. Also, execute the program in the IDLR shell window. save the program as filename.py

--

--