Event for CodeBuild CloudWatch on my Project

0 votes

I've been trying to make CloudWatch Event to work for my CodeBuild project on Build State Change but it's not working. It's working fine if I am removing the resource, but then again it triggers on any CodeBuild project. I am performing this code,  Am I performing this right or not? or is this code is not implemented for CodeBuild?


{
  "detail-type": [
    "CodeBuild Build State Change"
  ],
  "source": [
    "aws.codebuild"
  ],
  "resources": [
    "arn:aws:codebuild:us-east-2:1234567890:build/project-name:*"
  ]
}
May 25, 2018 in AWS by Flying geek
• 3,150 points
106 views

1 answer to this question.

0 votes

In order to create CWE rule for a CodeBuild project, try using 'detail.project-name' and filter it in your CWE rule

{
"source": [
   "aws.codebuild"
],
"detail-type": [
   "CodeBuild Build State Change"
],
"detail": {
   "project-name": [
      "project-name"
   ]
}  

}

Also, check this link in AWS Guidelines: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html

answered May 25, 2018 by Cloud gunner
• 4,260 points

Related Questions In AWS

0 votes
1 answer

How can I just increase the size of my root disk on AWS EC2 for use with Elastic Beanstalk?

This can be done using the following ...READ MORE

answered Nov 12, 2018 in AWS by Archana
• 5,480 points
106 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,160 points
101 views
+13 votes
2 answers
+1 vote
2 answers

Want my AWS s3 Bucket to read Name from CloudWatch Event

CloudTrail events for S3 bucket level operations ...READ MORE

answered May 28, 2018 in AWS by Cloud gunner
• 4,260 points
156 views
0 votes
3 answers