Articles

HipChat Notifications from AWS CodeDeploy


Using Amazon AWS CodeDeploy and HipChat for your development team and software projects?

In a previous article I described how you can create a Lambda function and use it through SNS to send HipChat notifications. In this article we're going to take this one step further and integrate another awesome Amazon service, AWS CodeDeploy so we can receive HipChat notifications during the lifecycle of a deploy, and keep the whole team updated about the deploy status.

Create your Amazon AWS Lambda with NodeJS

As in the previous article, our Lambda function is written in nodejs, it uses the NodeJS 4.3 Runtime that Amazon has made recently available for the public. Also, the code is almost the same, except for a slight difference in the handler function, that is adapted to handle the CodeDeploy JSON payload:

I recommend you to read the previous article so you know about some considerations (where to put your token, and how to setup your SNS Topic and your Lambda function properly so it can access the Internet).

Setup your Amazon AWS CodeDeploy Application and Software Project

Head to your AWS CodeDeploy Console, select your application, a deployment group, and edit it. Under Triggers click on Create Trigger pick a name, and choose all the events. In the SNS topic choose the SNS topic with the subscription that points to your Lambda function and then save it.

That's it!

Easy deploy your software projects with Amazon AWS CodeDeploy and receive updated status with HipChat

Now you can have notifications in your HipChat room whenever a deploy is created, finished, and in the middle as it goes through all your EC2 instances. Cool, uh?