@aws/aws-config-catalog-module-for-backstage

中文文档
0.4.0发布于 2026/08/06Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 1.8万

The aws-config backend module for the catalog plugin.

原始使用文档
文档目录6 节
  1. Installing
  2. Configuration
  3. Considerations
  4. JSONata expressions
  5. Use cases
  6. EKS catalog cluster locator

AWS Config catalog plugin for Backstage

This is the AWS Config catalog plugin for backstage.io which is designed to ingest AWS resource information in to the Backstage catalog.

Features:

  1. Automatically add AWS resources from AWS Config
  2. Uses incremental ingestion to efficiently ingest

Note: It is possible to easily configure this entity provider in a way that ingests a large amount of entities in to the Backstage catalog. Please review the Considerations section below.

Note: If you are not already using AWS Config it is important to note that you will incur costs by enabling it. Please review its pricing information before enabling in your AWS organization.

Installing

This guide assumes that you are familiar with the general Getting Started documentation and have assumes you have an existing Backstage application.

Install the backend package in your Backstage app:

yarn workspace backend add @backstage/plugin-catalog-backend-module-incremental-ingestion @aws/aws-config-catalog-module-for-backstage

Add the scaffolder module to the packages/backend/src/index.ts:

const backend = createBackend();
// ...
backend.add(
  import('@backstage/plugin-catalog-backend-module-incremental-ingestion'),
);
backend.add(import('@aws/aws-config-catalog-module-for-backstage'));
// ...
backend.start();

Configuration

Add entity providers to the Backstage application configuration like so:

providers:
  awsConfig:
    default: # Name of the provider
      accountId: # [OPTIONAL] AWS account ID to use to access AWS Config API
      region: # [OPTIONAL] AWS region to use to access AWS Config API
      aggregator: # [OPTIONAL] The name of the AWS Config aggregator
      hashEntityNames: # [OPTIONAL] Generated entity names will always be hashes of the ARN
      filters: # Filter the resources queried from AWS Config API
        tags: # [OPTIONAL] Match by tags on the AWS resources
          - key: 'component' # Only retrieve resources that have a 'component' tag
          - key: environment # Only retrieve resources that have a 'environment' tag with value 'prod'
            value: prod
        resourceTypes: # [REQUIRED] Filter by AWS resource type
          - AWS::ECS::Cluster
          - AWS::ECS::Service
          - AWS::DynamoDB::Table
          - AWS::RDS::DBCluster
          - AWS::Lambda::Function
          - AWS::ElasticLoadBalancingV2::LoadBalancer
          - AWS::ApiGatewayV2::Api
          - AWS::S3::Bucket
      transform: # [OPTIONAL] Apply transformations to the emitted entity
        fields: # Modify specific fields
          name: # Customize the name field generated (see note below)
            expression: $join([$resource.resourceName, $resource.accountId], '-')
          annotations: # Add to metadata.annotations
            accountId:
              expression: $resource.accountId # Add an annotation with the AWS account ID using JSONata expression
          spec:
            owner:
              tag: owner # Set 'spec.owner' to the value of the 'owner' tag on the AWS resource
            component:
              tag: component # Create a 'dependencyOf' relationshop based on the 'component' tag
            system:
              value: my-system # Set 'spec.system' to a hard-coded value of 'my-system'
      options: # [OPTIONAL] Configure details of the provider behavior
        incremental:
          restLength: { hours: 6 } # Wait 6 hours between each ingestion cycle

An entity created by the above configuration would look like this:

apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  annotations:
    aws.amazon.com/arn: arn:aws:ecs:us-west-2:1234567890:service/my-cluster/my-app
    aws.amazon.com/name: my-app
    aws.amazon.com/region: us-west-2
    aws.amazon.com/resource-id: arn:aws:ecs:us-west-2:1234567890:service/my-cluster/my-app
    aws.amazon.com/resource-type: AWS::ECS::Service
  name: my-app
  description: AWS Config Resource AWS::ECS::Service my-app
spec:
  owner: my-team
  type: ecs-service
  system: my-system

NOTE: The metadata.name field must be unique across your Backstage instance, otherwise entities will over-write each other. If your AWS resources naming is already unique then you have no actions to take. If you have AWS resources that potentially have conflicting names then you will need to use the transform.fields.name configuration value to transform the metadata.name field to something unique for each entity.

Considerations

Its recommended to use the configuration available to ingest the minimum entities necessary in to the Backstage catalog. AWS Config, especially in larger organizations, can be tracking a large number of AWS resources that can have a negative affect on both the ingestion mechanism as well as the user catalog experience once stored.

General recommendations are:

  1. Use the resourceTypes field to limit to the desired AWS services. If needed, start with 1 or 2 resource types and gradually add more to assess impact on Backstage catalog size.
  2. Limit ingestion to a single "environment" such as staging or production.
  3. Configure the ingestion schedule appropriately based on the number of resources that will be ingested.

JSONata expressions

One of the ways the provider can transform entities is to use JSONata expressions via the expressions fields. This is a flexible way to transform fields on the emitted entity based on any field in the AWS Config resource payload.

The AWS Config resource payload is available through the $resource variable.

Heres a simple example that sets an annotation with the resource account ID:

transform:
  fields:
    annotations:
      accountId:
        expression: $resource.accountId

Here is a more complex example that sets an annotation with the RDS engine version only if the resource is an RDS DB cluster:

transform:
  fields:
    annotations:
      engineVersion:
        expression: $resource.resourceType = "AWS::RDS::DBCluster" ? $resource.configuration.engineVersion

The expression must return a string.

Use cases

This section contains some examples of specific use-cases beyond simple resource ingestion.

EKS catalog cluster locator

The Backstage catalog Kubernetes cluster locator sources information on Kubernetes clusters from the Backstage catalog to power the Kubernetes plugin. This is a more flexible mechanism than configuring clusters in the Backstage configuration.

This entity provider can be used to generate Resource entities that are compatible with this plugin by using field transforms:

providers:
  awsConfig:
    eksClusters:
      filters:
        tags: [...]
        resourceTypes:
          - AWS::EKS::Cluster
      transform:
        fields:
          annotations:
            'amazonaws.com/account-id':
              expression: $resource.accountId
            'amazonaws.com/arn':
              expression: $resource.arn
            'kubernetes.io/api-server':
              expression: $resource.configuration.Endpoint
            'kubernetes.io/api-server-certificate-authority':
              expression: $resource.configuration.CertificateAuthorityData
            'kubernetes.io/x-k8s-aws-id':
              expression: $resource.resourceName
            'kubernetes.io/auth-provider':
              value: aws
          spec:
            owner:
              tag: owner
            component:
              tag: component
            type:
              value: kubernetes-cluster

Filter the clusters appropriately using tags.

版本与发布记录

@aws/aws-config-catalog-module-for-backstage 共发布 16 个版本,首次发布于 2024/11/30;过去 12 个月发布了 3 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.0latest2026/08/063 个月前
0.3.32026/04/236 个月前
0.3.22025/11/1411 个月前
0.3.12025/11/081 年前
0.3.02025/09/191.1 年前
0.2.02025/08/211.2 年前

关于 @aws/aws-config-catalog-module-for-backstage 的常见问题

@aws/aws-config-catalog-module-for-backstage 是什么?

The aws-config backend module for the catalog plugin.

如何安装 @aws/aws-config-catalog-module-for-backstage?

在项目目录运行 npm install @aws/aws-config-catalog-module-for-backstage,或使用 pnpm add / yarn add / bun add。

@aws/aws-config-catalog-module-for-backstage 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aws/aws-config-catalog-module-for-backstage 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aws/aws-config-catalog-module-for-backstage 可以商用吗?

@aws/aws-config-catalog-module-for-backstage 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@aws/aws-config-catalog-module-for-backstage 的下载量有多少?

根据 npm 官方下载统计,@aws/aws-config-catalog-module-for-backstage 在 2026/10/08 – 2026/11/06 这 30 天内被下载 17,573 次,日均约 586 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aws/aws-config-catalog-module-for-backstage 还在维护吗?

最新版本 0.4.0 发布于 2026/08/06(3 个月前);至今共发布 16 个版本,其中过去 12 个月发布了 3 个;首次发布于 2024/11/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。