Processing a CSV file with a Python application on an EC2 server
In the previous chapter, we processed a CSV file within Lambda. In this section, we will run the same application within EC2, but there will be some differences:
- Log in to the EC2 machine.
- Create a folder in which to keep the
csvfile that is to be processed. - Run the
mkdir csvcommand in order to create acsvfolder on Ubuntu:
Figure 4.30 – Creating a folder
After running the mkdir command, you can execute with the ls command in order to list your directory. As you see, the csv folder is created.
- Locate the
csvfolder by executingcd csv:
Figure 4.31 – Locating the csv folder
- Create a sample
CSVfile in the EC2 machine.
I have uploaded a sample CSV file for you in the following URL. Run the following code to download the sample CSV. The wget command allows you to download the file from the specific link...