diff --git a/README.md b/README.md index bce03c126..a882ea8f9 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Only the latest version gets security updates. We won't support older versions. * `AWS/ClientVPN` - Client-based VPN * `AWS/CloudFront` - Cloud Front * `AWS/Cognito` - Cognito + * `AWS/CodeBuild` - Code Build * `AWS/DataSync` - DataSync * `AWS/DDoSProtection` - Distributed Denial of Service (DDoS) protection service * `AWS/DirectoryService` - Directory Services (MicrosoftAD) diff --git a/examples/codebuild.yaml b/examples/codebuild.yaml new file mode 100644 index 000000000..e7f214c97 --- /dev/null +++ b/examples/codebuild.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: v1alpha1 +discovery: + jobs: + - type: AWS/CodeBuild + regions: + - us-east-1 + period: 300 + length: 300 + metrics: + - name: SucceededBuilds + statistics: [Sum] + - name: FailedBuilds + statistics: [Sum] + - name: Builds + statistics: [Sum] + - name: Duration + statistics: [Average, Maximum, Minimum, p90] diff --git a/pkg/config/services.go b/pkg/config/services.go index 32ea28e0a..d9164f9f3 100644 --- a/pkg/config/services.go +++ b/pkg/config/services.go @@ -246,6 +246,18 @@ var SupportedServices = serviceConfigs{ regexp.MustCompile("keyspace/(?P[^/]+)/"), }, }, + { + Namespace: "AWS/CodeBuild", + Alias: "codebuild", + ResourceFilters: []*string{ + aws.String("codebuild:build"), + aws.String("codebuild:project"), + }, + DimensionRegexps: []*regexp.Regexp{ + regexp.MustCompile("project/(?P[^/]+)"), + regexp.MustCompile("build/(?P[^/]+):(?P[^/]+)"), + }, + }, { Namespace: "AWS/CloudFront", Alias: "cloudfront",