AWS CLI를 사용하여 고객 관리형 구성 레코더로 AWS Config 시작 - AWS Config

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

AWS CLI를 사용하여 고객 관리형 구성 레코더로 AWS Config 시작

고객 관리형 구성 레코더를 생성하여 AWS Config를 시작할 수 있습니다. AWS CLI를 사용하여 고객 관리형 구성 레코더를 생성하려면, put-configuration-recorder, put-delivery-channelstart-configuration-recorder 명령을 사용합니다.

  • put-configuration-recorder 명령은 고객 관리형 구성 레코더를 생성합니다.

  • put-delivery-channel 명령은 전송 채널을 생성하여 AWS Config가 구성 정보를 S3 버킷 및 SNS 주제로 전송합니다.

  • start-configuration-recorder는 고객 관리형 구성 레코더를 시작합니다. 고객 관리형 구성 레코더는 지정한 리소스 유형에 대한 구성 변경 사항을 기록하기 시작합니다.

고려 사항

S3 버킷, SNS 주제 및 IAM 역할이 필요

고객 관리형 구성 레코더를 생성하려면 전제 조건으로 정책이 연결된 S3 버킷, SNS 주제 및 IAM 역할을 생성해야 합니다. AWS Config 사전 조건을 설정하려면 사전 조건을 참조하세요.

리전별 계정당 고객 관리형 구성 레코더 1개

각 AWS 리전에 대해 AWS 계정 각각 하나의 고객 관리형 구성 레코더만 가질 수 있습니다.

리전별 계정당 전송 채널 1개

각 AWS 리전에 대해 AWS 계정 각각 하나의 전송 채널 리전만 가질 수 있습니다.

정책 및 규정 준수 결과

IAM 정책AWS Organizations에서 관리되는 기타 정책은 AWS Config에 리소스에 대한 구성 변경을 기록할 권한이 있는지 여부에 영향을 미칠 수 있습니다. 또한 규칙은 리소스의 구성을 직접 평가하며, 규칙은 평가를 실행할 때 이러한 정책을 고려하지 않습니다. 적용 중인 정책이 AWS Config 사용 의도와 일치하는지 확인합니다.

1단계: put-configuration-recorder 실행

put-configuration-recorder 명령을 사용하여 고객 관리형 구성 레코더를 생성합니다.

이 명령은 --configuration-recorder---recording-group 필드를 사용합니다.

$ aws configservice put-configuration-recorder \ --configuration-recorder file://configurationRecorder.json \ --recording-group file://recordingGroup.json

configuration-recorder 필드

configurationRecorder.json 파일이 name, roleArn 및 구성 레코더(recordingMode)의 기본 기록 빈도를 지정합니다. 이 필드를 사용하여 특정 리소스 유형의 기록 빈도를 재정의할 수도 있습니다.

{ "name": "default", "roleARN": "arn:aws:iam::123456789012:role/config-role", "recordingMode": { "recordingFrequency": CONTINUOUS or DAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override", "recordingFrequency": CONTINUOUS or DAILY, "resourceTypes": [ Comma-separated list of resource types to include in the override ] } ] } }

recording-group 필드

recordingGroup.json 파일은 기록되는 리소스 유형을 지정합니다.

{ "allSupported": boolean, "exclusionByResourceTypes": { "resourceTypes": [ Comma-separated list of resource types to exclude ] }, "includeGlobalResourceTypes": boolean, "recordingStrategy": { "useOnly": "Recording strategy for the configuration recorder" }, "resourceTypes": [ Comma-separated list of resource types to include] }

이러한 필드에 대한 자세한 내용은 AWS CLI 명령 참조의 put-configuration-recorder 섹션을 참조하세요.

2단계: put-delivery-channel 명령 실행

put-delivery-channel 명령을 사용하여 전송 채널을 만듭니다.

이 명령은 --delivery-channel 필드를 사용합니다.

$ aws configservice put-delivery-channel --delivery-channel file://deliveryChannel.json

delivery-channel 필드

deliveryChannel.json 파일이 지정하는 것은 다음과 같습니다.

  • 전송 채널의 name.

  • AWS Config가 구성 스냅샷을 전송하는 s3BucketName.

  • AWS Config가 알림을 보내는 snsTopicARN.

  • AWS Config가 구성 스냅샷을 전송하는 빈도와 주기적 규칙에 대한 평가를 간접 호출하는 빈도를 설정하는 configSnapshotDeliveryProperties.

{ "name": "default", "s3BucketName": "config-bucket-123456789012", "snsTopicARN": "arn:aws:sns:us-east-1:123456789012:config-topic", "configSnapshotDeliveryProperties": { "deliveryFrequency": "Twelve_Hours" } }

이러한 필드에 대한 자세한 내용은 AWS CLI 명령 참조의 put-delivery-channel 섹션을 참조하세요.

3단계: start-configuration-recorder 명령 실행

start-configuration-recorder 명령을 사용하여 AWS Config를 시작합니다.

$ aws configservice start-configuration-recorder --configuration-recorder-name configRecorderName

이러한 필드에 대한 자세한 내용은 AWS CLI 명령 참조의 start-configuration-recorder 섹션을 참조하세요.