How to Deploy to AWS Manually

maxwell kwarteng
4 min readMar 8, 2021

We recently completed our capstone project at Lambda. The project was to build and deploy an app called Cityspire. Cityspire is an app that puts data into the hands of the mover to make an informed decision on which city to live. We had 3 people on our data science team. We worked with 4 members from the web development team. This article will focus on the deployment to AWS. Deployment was one of the major blockers for the data science teams. I hope this will help someone out there that is trying to deploy to AWS for the first time.

Info on AWS

This will be a tutorial on how to set up an application in AWS. This will include how to load the artifact from your computer and how to access it in AWS. The artifact is an archived file of your application on your computer. Register and Sign up to AWS for the free service. Not all the resources are free. That means you might still be charged for some of the resources. Make sure that you terminate your demo or project after you are done using AWS so that you don’t get charged later on.

Navigating to Elastic Beanstalk

In the service section of AWS, we look at compute and then Elastic Beanstalk. This is what we will use to deploy our application to AWS. On the homepage of Elastic Beanstalk, you can see **Environment**, **Applications**, **Change History** on the left side of the menu bar.

Finding Elastic Beanstalk
Select Application to build default app

Creating the Default Application for Deployment

If you are trying to create an application, you can select the application option. Enter the **Application name**. **Application tags** can be empty. **Platform**; you can select python or whatever programming language you prefer. In our case, we are building a python application so we will select python. **Application code**; you can select sample application. Then click on **Create application** which will create a default application for you. You can later configure the default application to your heart desire. It takes a few seconds to configure your default application.

Application name, Platform and Application code are modified

After the configuration, you will get an auto generated domain name which you can use to access your application. You will see the **Health**, **Running version** and **Platform** after the configuration.

Ensure Health is Ok

Uploading the Artifact

You can now click on Environments menu under the Elastic Beanstalk homepage. You will see your newly created default application under Environments. Look out for the Running version, which will be between Health and Platform. Click on Upload and Deploy, this will help you upload the artifact manually. The artefact should be rar file of all your code and dependencies on your computer. You can use winzip or winrar to archive your files to create the artifact for upload. Click on deploy in AWS. This might take some time to deploy. If the upload is successful, the Health will show Ok. Click on the generated domain name to confirm the endpoint of your application is working.

Cityspire-f-ds3 will be uploaded here
The deployed FastAPI Endpoints

Conclusion

So, what we just did was login to AWS compute service and Elastic Beanstalk. We created an application with a given name which by default created an Environment for us. We then went into our environment and uploaded our artifact from our computers to AWS. We used the configured domain name to confirm that our deployment was successful. Next time I will show you how to deploy using docker.

--

--