Deploying an application to Elastic Beanstalk was pretty tricky for me at first. It's pretty simple but somehow I messed it up so many times. Here is a guide to get you started so you don't make the same mistakes I did.
- clone or download this repo https://github.com/ikey2244/apollo-server-elastic-beanstalk.git
- navigate to wherever you downloaded it
- click on the apollo-server-elastic-beanstalk folder
- highlight everything, right click and create a zip called application.zip
- we will be using this zip later so just hang on to it for now
Sign into your AWS console https://aws.amazon.com/. Or go to https://portal.aws.amazon.com/billing/signup#/start if you haven't made an account
*dislaimer: AWS makes you put in a credit card in order to make an account. It's free but you have to monitor your usage. It's very easy to wrack up charges.
Once you've signed in or created your account you will be greeted with this page. Go ahead and search for Elastic Beanstalk. Click the "Elastic Beanstalk" from the suggestions list
Click the blue "Get Started" button
This is where we will configure our Elastic Beanstalk environment and application.
Go ahead and do the following:
- Application name: apollo-server
- Platform: Node.js
- Upload your code: click "upload" button a window will pop up that looks like this:
- Choose the zip file called application.zip that we created earlier
- Click "Upload" button
- Finally click the "Create Application" button
After following those steps you should see something like this:
Now we wait...
If followed each step correctly you should see something like this. Success!
Click on the URL that was generated at the top and see your new application in all of its glory!
This is a pretty simple setup. Stay tuned for a more complicated example. :)