본문 바로가기
WIKI 기술 지식 베이스

AWS S3 Discovery

원문 보기 위키 갱신

AWS S3 통합에는 S3 버킷에 있는 카탈로그 엔티티를 발견하기 위한 특별한 엔티티 제공자가 있어요. 여러 카탈로그 파일이 들어 있는 버킷이 있고 자동으로 발견하고 싶다면 이 제공자를 사용할 수 있어요. 제공자는 S3 버킷을 크롤링해서 구성된 경로에 일치하는 엔티티를 등록해요. 정적 위치를 쓰거나 카탈로그에 항목을 수동으로 추가하는 것의 대안으로 유용할 수 있어요.

출처: 문서

본문

AWS S3 통합에는 S3 버킷에 있는 카탈로그 엔티티를 발견하기 위한 특별한 엔티티 제공자가 있어요. 여러 카탈로그 파일이 들어 있는 버킷이 있고 자동으로 발견하고 싶다면 이 제공자를 사용할 수 있어요. 제공자는 S3 버킷을 크롤링해서 구성된 경로에 일치하는 엔티티를 등록해요. 이는 정적 위치를 쓰거나 카탈로그에 항목을 수동으로 추가하는 것의 대안으로 유용할 수 있어요.

엔티티 제공자를 사용하려면 accessKeyId와 secretAccessKey, 그리고/또는 roleArn 또는 이들 중 아무것도 없는(예: 프로필 또는 인스턴스 기반 자격 증명) AWS S3 통합이 설정되어 있어야 해요.

프로덕션 배포에서는 보통 인스턴스에 부착된 권한으로 이것들을 관리할 거예요.

구성에서 버킷별로 제공자 구성을 추가해요.

# app-config.yamlcatalog:  providers:    awsS3:      yourProviderId: # identifies your dataset / provider independent of config changes        bucketName: sample-bucket        prefix: prefix/ # optional        region: us-east-2 # optional, uses the default region otherwise        accountId: '123456789012' # optional, uses the main account otherwise        schedule: # same options as in SchedulerServiceTaskScheduleDefinition          # supports cron, ISO duration, "human duration" as used in code          frequency: { minutes: 30 }          # supports ISO duration, "human duration" as used in code          timeout: { minutes: 3 }

간단한 설정이라면 구성에서 제공자 ID를 생략할 수 있는데, default를 사용하는 것과 같은 효과예요.

# app-config.yamlcatalog:  providers:    awsS3:      # uses "default" as provider ID      bucketName: sample-bucket      prefix: prefix/ # optional      region: us-east-2 # optional, uses the default region otherwise      accountId: '123456789012' # optional, uses the main account otherwise      schedule: # same options as in SchedulerServiceTaskScheduleDefinition        # supports cron, ISO duration, "human duration" as used in code        frequency: { minutes: 30 }        # supports ISO duration, "human duration" as used in code        timeout: { minutes: 3 }

이 제공자는 기본 제공자 중 하나가 아니므로 먼저 AWS 카탈로그 플러그인을 설치해야 해요.

Backstage 루트 디렉터리에서

yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-aws

그런 다음 다음 줄을 추가해 백엔드를 업데이트하세요.

packages/backend/src/index.ts

backend.add(import('@backstage/plugin-catalog-backend'));backend.add(import('@backstage/plugin-catalog-backend-module-aws'));

더 알아보기 (Learn more)