How to do it...

Since the application lies in our CC-AWSSTAR-APP, the CodeCommit repository is a NodeJS application, so we need to install NodeJS and npm packages in the instance. To do that, we need to perform the following steps:

  1. Launch an EC2 instance preferably CentOS/Red Hat/Amazon Linux in the same region and install the necessary packages by running the following commands:
    # yum update -y    # yum install epel-release curl wget gcc make g++ bind-utils -y    # yum install nodejs -y    # npm install -g forever
  1. Once we are done installing the application-dependent package, we have to install the AWS CodeDeploy agent tool. To install the agent, refer How to do it... section of Deploy a static application in an EC2 instance from S3 Bucket using ...

Get AWS Automation Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.