Deployment and Elastic Beanstalk

30 April 2019 — Written by Joe Boulos
#javascript#aws#elastic beanstalk#ebs#production#Redux#HTML#SQL#NOSQL#Front-end#Back-end

Medium Article: Deployment and EBS

For the past couple of weeks, me and a team of two others have been working on a project to create an ESPN NFL team webpage clone, using React and Bootstrap. We’ve run into some interesting challenges during the duration of the project, the most interesting one being the deployment of each microservice and the eventual deployment of a proxy server that ties each microservice together into one functional application.

The most obvious challenge that we were all were expecting was figuring out the actual process of deploying a microservice, since none of us have any previous or successful experience with deploying an application. Each of us was also responsible with deploying our services individually. With this in mind, I began formulating a plan of attack on how to best overcome this issue.

Initially, I began with creating a list of possible resources on where to find information on Amazon Web Services (aws), EC2, S3 and Elastic Beanstalk. The most obvious resources was the documentation found on Amazons website. After reading through some of the readily available resources, I realized I still did not have a clear understanding on where to begin, what requirements or restrictions there may be, how to create an instance, how to connect to my database or how AWS worked in general.

Each individual person has a different style of learning and different methods for what is most effective for them. I, myself, am a visual learner. With that in mind, I began a search through youtube for helpful videos that give brief explanations of what AWS actually was and the different services that are being offered.

This youtuber in particular, Academind, had a great playlist specifically for AWS that gave me a great starting point (link to the first video in his AWS playlist can be found here: ).

After reading through the documentation on Amazons site and skimming through some of the videos found on youtube, I found that there are a few ways to deploy a microservice. The quickest and most easiest is as follows:

Create an AWS account, sign up for free Tiers (unless you prefer extra features from the paid versions). From the home console after signing in, scroll down to where you can see “build a solution” then select “build a web app”.

Select the correct configurations for the platform of your code (in my case it was Node.js). Upload your code (you need to compress your code into a zip file then upload it). Once it has been uploaded, click on the “configuration options” button towards the bottom of the page. Make sure the version option is the correct platform and version you want, in my case it was the latest version of Node.js There is an empty box for you to enter start commands if you have specific script commands from your package.json file. I have a particular command to start the server which I have labeled as “start”, so in the box I entered “npm start” so that the server can initiate. Apply the changes then click “create app” and you’re done.

Elastic Beenstalk will take a few minutes to create an instance of your application and provide a link to it once it has finished and you’ll be able to see your service up and running.

Arriving to the point of actually understanding what AWS was and how to utilize its services was the most difficult part of this process. The actual deployment of an application/microservice through AWS is very simple and easy.