This is a project to show you how to Deploy a Node.js Application like this over AWS Beanstalk using AWS Cloud Formation.
To run this code, you need:
- An AWS Account and an user with AWS Access Key
- Python and Python Pip installed on your local computer
Installing the AWS Command Line Interface
pip install --upgrade --user awscli
Configure awscli (iterative mode)
cd ~
aws configure
Install the Elastic Beanstalk Command Line Interface
pip install --upgrade --user awsebcli
Creating a AWS Key Pairs using AWSCLI
aws ec2 create-key-pair \
--key-name hello-world-app-ec2-key-pair \
--query 'KeyMaterial' \
--region eu-west-1 \
--output text > ~/.ssh/hello-world-app-ec2-key-pair.pem
chmod 400 ~/.ssh/hello-world-app-ec2-key-pair.pem
This project provide a deploy.sh script to help us deploy our project and environment.
./deploy.sh init
It use AWS CloudFormation template locate in deployment/cf-beanstalk.json and a config file deployment/application-conf.json where you can put your own config Parameters
This project provide a deploy.sh script to help us destroy our project and environment.
./deploy.sh destroy
you can use eb cli to control your project.
if you want to changes your project, execute:
eb deploy <your environment name>
if you want to know the environments in your project, just execute:
eb list
if you want open your application environment using your default web browser use:
eb open
if you want to knoe more about eb cli, click here