I want to create a Cloudwatch event that runs a Codebuild project every time a pull request is made on a CodeCommit branch. However, the event I made is not triggering upon creation of the pull request on the master branch. Hope you guys could give me some advice on this.
Below is the event pattern of the event rule that I made:
{
"source": [
"aws.codecommit"
],
"detail-type": [
"CodeCommit Pull Request State Change"
],
"resources": [
"arn:aws:codecommit:XX-XX-1:XXX:dev-test"
],
"detail": {
"event": [
"pullRequestCreated"
],
"referenceType": [
"branch"
],
"referenceName": [
"master"
]
}
}