#Initialization
- Launch from the AWS console
- Download the eb cli tools http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html
- Setup your files in a new dir
- Run git init
- git commit
- eb init
- eb create
#RDS
- Log in to eb through the console and click on the dashboard for your app
- Click on Configuration
- Under Data Tier there should be an option to create an RDS instance. Click on it.
- Choose the options for your db. I chose:
- Postgres
- 9.5.2
- db.t2.micro Make sure to choose the correct instance size It affects how much you are charged
- Enter the credentials
- Launch the RDS instance.
- It will take a little while for the instance to be active
- You don't need to hard code the credentails in your app. Eb puts them in your environment .http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html
#Running
- make changes
- git commit
- eb deploy (no git push)
- eb ssh to log in to the instance. The instance is volatile, meaning changing code on the fly will be overitten by the next eb deploy (not to mention when you have multiple instances).
#EB deployment
- git repo is zipped
- It is saved to S3 and from there to the instance(s). All the old files are removed and the new ones are unzipped
- On a node instance the following commands are run:
- npm install -- installs the library
- npm start -- runs your application
- package.json need something like the following to start the app
"scripts": {
"start": "node server/server.js",
},