/cdk-badges

Generate status badges for your AWS CDK applications

Primary LanguageTypeScriptApache License 2.0Apache-2.0

cdk-badges

npm version Pipeline

Generate badges for your cdk applications. Badges are created via eventbride events that invoke a lambda function that writes the badge to a s3 bucket.

Installation

yarn add cdk-badges

Usage

Generate Badges for your cloudformation stacks.

new CdkBadges(stack, 'Badges', {
  cloudformationCaptures: {
    captureAll: true,
    enabled: true,
  },
  codepipelineCaptures: {
    captureAll: true,
    enabled: true,
  },
  badgeStyles: ['flat-square'],
  cacheControl: 'max-age=300',
  localization: {
    hour12: false,
    locale: 'de-AT',
    showSeconds: false,
    timezone: 'Europe/Vienna',
  },
})

Features

  • Generate badges for your stacks
  • View all available badges in a web ui
  • Generate badges for aws codepipeline

Available Badges

  • Cloudformation stack status
  • Cloudformation resource count
  • Codepipeline status
  • Codepipeline

Web UI

The web ui shows all available badges in the specified s3 bucket. It can be accessed via the cloudformation output.

web-ui

Adding a custom domain

To add a custom domain for badges you should use a cloudfront distribution. Create a cloudfront distribution with the s3 bucket as origin and add a custom domain. Specify the root object to use the lambda function url as an origin.