Posted On: Dec 14, 2017
Amazon CloudWatch Events enables you to respond quickly to application availability issues or configuration changes that might impact performance or security by notifying you of AWS resource changes in near-real-time. You simply write rules to indicate which events are of interest to your application and what automated action to take when a rule matches an event. You can, for example, invoke AWS Lambda functions or notify an Amazon Simple Notification Service (SNS) topic.
Now, you can use an AWS CodeBuild project as an event target to start running a build. AWS CodeBuild is a fully managed build service that compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. It eliminates the need to provision, manage, and scale your own build servers. You can also fully customize build environments in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically to meet peak build requests, and you pay only for the build time you consume.
You can add CodeBuild as a target by creating a CloudWatch Events rule and specify the CodeBuild Project ARN of your interest. Once a rule matches an event, it starts the build by invoking the StartBuild API for the specified build project. This feature is available in all AWS Public Regions where AWS CodeBuild is present.