- Create an Elastic Beanstalk application named after the current folder:
eb init --platform node.js --region sa-east-1
- Create a load balanced environment with the default settings for Node.js:
eb create --sample node-express-env
- Set the Node Command to "npm start":
.ebextensions/nodecommand.config
option_settings:
aws:elasticbeanstalk:container:nodejs:
NodeCommand: "npm start"
-
Stage the files to Git repository (add & commit).
-
Deploy the changes:
eb deploy node-express-env
- Open command to open the environment's URL in the default browser:
eb open
- Terminate your environment and all of the resources that it contains:
eb terminate node-express-env
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
- create a bash script to automate the task