1

I'm trying to trigger a CodePipeline Build when someone makes a commit to an AWS Codecommit branch. This works if I target the master branch with a pattern like this:

{
  "detail": {
    "referenceName": ["master"],
    "referenceType": ["branch"]
  },
  "detail-type": ["CodeCommit Repository State Change"],
  "resources": ["arn:aws:codecommit:region:1234:repo-name"],
  "source": ["aws.codecommit"]
}

But it does not work when I try to match any branch that starts with the "release" string, as per documentation from here:

{
  "detail": {
    "referenceName": [{
      "prefix": "release/"
    }],
    "referenceType": ["branch"]
  },
  "detail-type": ["CodeCommit Repository State Change"],
  "resources": ["arn:aws:codecommit:region:1234:repo-name"],
  "source": ["aws.codecommit"]
}

Is there another way I can match a branch with a pattern name?

fedonev
  • 20,327
  • 2
  • 25
  • 34
Bobby Tables
  • 2,953
  • 7
  • 29
  • 53
  • The filter pattern is OK. Is the event firing? Check the invocation metrics in Rule>Monitoring in the EventBridge console. – fedonev Dec 11 '22 at 13:51

0 Answers0