Node.js Amazon CloudFormation templatein Development @ July 18, 2012
The following CloudFormation template will allow you to easily launch Amazon EC2 instances running Node.js, without having to install and configure Node on EC2 every single time.
In order to use it, you need to go to your AWS console in the CloudFormation section and do the following:
- Click the Create new stack button
- In the Stack Name field provide a name, i.e “Nodejs server”.
- In the Stack template source choose Upload a template file and browse for the nodejs.template file (download the Node.js EC2 template). Hit continue.
- In the next screen I’ve added a few options in the template so that you can customize your EC2 instance. You will need to provide:
- Security group name
- Name of an existing EC2 KeyPair to enable SSH access
- EC2 instance type (e.g. m1.small)
- Hit the continue button again to review your template in the final screen.
- If you are happy, you can hit continue one final time to activate the template. (Just a reminder – this last action will activate an EC2 instance, which is going to cost you money! )
CloudFormation will now process the template and activate an EC2 instance of your chosen size. You can monitor the progress in the AWS console.
If you’d rather like to install Node.js manually, check out my step-by-step guide of setting up a new Amazon AWS EC2 instance and installing Node.js with NPM.
This is the Node.js Amazon CloudFormation template: