Skip to content

a CLI tool to deploy node.js projects to AWS EC2 (mentioned EC2 instance or create a new one)

Notifications You must be signed in to change notification settings

anuj-thakur-513/deploy-nodejs-cli

Repository files navigation

aws-deploy-nodejs

A CLI tool which allows you to directly deploy your personal projects to an EC2 instance. Either create a new instance or pass the instance-id to deploy on an already existing instance.

Steps to use:

  • Create an IAM User with following permissions (generate an access key for this user):

    • AmazonEC2FullAccess
    • AmazonSSMFullAccess
    • AmazonSSMManagedInstanceCore
    • AmazonIAMFullAccess
  • Create an IAM Profile with following permissions:

    • AmazonEC2FullAccess
    • AmazonSSMFullAccess
    • AmazonSSMManagedInstanceCore
    • AmazonEC2RoleforSSM
  • If you want to host on an already existing instance, attach the IAM profile to that instance otherwise nothing required

  • Create a Security group which exposes the desired ports in the inbound rules or just expose the ports that you want to expose

  • Replace .env.sample with .env and add all the values

  • npm install

  • npm i -g .

  • aws-deploy-nodejs --help

Command Use

Demo Video

AWS.Deploy.nodejs.CLI.mp4

Contributions

  • Fork the repo and clone it locally
  • Setup the .env file and install the command globally
  • Create a new branch for the feature you're going to add
  • Push your changes and raise a PR

About

a CLI tool to deploy node.js projects to AWS EC2 (mentioned EC2 instance or create a new one)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published