How to non stop when deploying a new version app

I use EC2 from AWS. (Ubuntu OS)
Whenever I released a new version of the app, I had to stop the existing service.
Is there a way to deploy without interruption?

Amazon Elastic Beanstalk (EBS) with at least 2 machines and deploy 1 by 1. You need at least 2 EC2s so you can keep at least one alive

I solved this problem using pm2 package.
When using pm2, create a file called process.json to apply environment variables,
I ran it with sudo pm2 start process.jsom.

ex json format:

  "apps": [
      "name": "...",
      "script": "./main.js",
      "log_date_format": "YYYY-MM-DD",
      "exec_mode": "fork_mode",
      "env": {
        "PORT": 80,
        "MONGO_URL": "...",
        "ROOT_URL": "..."