AWS CLI를 사용한 리소스 기록
AWS CLI를 사용하여 AWS Config에서 기록하도록 할 리소스 유형을 선택할 수 있습니다. 기록 그룹에서 지정한 리소스 유형을 기록하는 고객 관리형 구성 레코드를 만들어 이를 수행합니다. 기록 그룹에서 지원되는 모든 리소스 유형을 기록할지 아니면 특정 유형의 리소스를 포함 또는 제외할지 지정합니다.
- Record all current and future supported resource types
-
이 리전에서 현재 및 향후에 지원되는 모든 리소스 유형에 대한 구성 변경 사항을 기록하도록 AWS Config를 설정합니다. 지원되는 리소스 유형 목록은 지원되는 리소스 유형 섹션을 참조하세요.
-
put-configuration-recorder명령을 사용합니다.이 명령은
--configuration-recorder및---recording-group필드를 사용합니다.$ aws configservice put-configuration-recorder \ --configuration-recorderfile://configurationRecorder.json\ --recording-groupfile://recordingGroup.jsonconfiguration-recorder필드configurationRecorder.json파일이name,roleArn및 구성 레코더(recordingMode)의 기본 기록 빈도를 지정합니다.{ "name": "default", "roleARN": "arn:aws:iam::123456789012:role/config-role", "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override", "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] } }recording-group필드recordingGroup.json파일은 기록되는 리소스 유형을 지정합니다.{ "allSupported": true, "recordingStrategy": { "useOnly": "ALL_SUPPORTED_RESOURCE_TYPES" }, "includeGlobalResourceTypes": true }이러한 필드에 대한 자세한 내용은 AWS CLI 명령 참조의
put-configuration-recorder섹션을 참조하세요. -
(선택 사항) 고객 관리형 구성 레코더에 원하는 설정이 있는지 확인하려면 다음
describe-configuration-recorders명령을 사용합니다.$ aws configservice describe-configuration-recorders다음은 응답의 예입니다.
{ "ConfigurationRecorders": [ { "name": "default" "recordingGroup": { "allSupported": true, "exclusionByResourceTypes": { "resourceTypes": [] }, "includeGlobalResourceTypes": true, "recordingStrategy": { "useOnly": "ALL_SUPPORTED_RESOURCE_TYPES" }, "resourceTypes": [], }, "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override, "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] }, "roleARN": "arn:aws:iam::123456789012:role/config-role" } ] }
-
- Record all current and future supported resources types excluding the types you specify
-
사용자가 기록에서 제외하도록 지정한 리소스 유형을 제외하고 글로벌 리소스 유형을 포함한 현재 및 향후 지원되는 모든 리소스 유형에 대한 구성 변경을 기록하도록 AWS Config를 설정합니다.
리소스 유형에 대한 기록을 중지하도록 선택하면 이미 기록된 구성 항목은 변경되지 않습니다. 지원되는 리소스 유형 목록은 지원되는 리소스 유형 섹션을 참조하세요.
-
put-configuration-recorder명령을 사용합니다.이 명령은
--configuration-recorder및---recording-group필드를 사용합니다.$ aws configservice put-configuration-recorder \ --configuration-recorderfile://configurationRecorder.json\ --recording-groupfile://recordingGroup.jsonconfiguration-recorder필드configurationRecorder.json파일이name,roleArn및 구성 레코더(recordingMode)의 기본 기록 빈도를 지정합니다.{ "name": "default", "roleARN": "arn:aws:iam::123456789012:role/config-role", "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override", "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] } }recording-group필드recordingGroup.json파일은 AWS Config가 기록할 리소스 유형을 지정합니다. 다음 예제와 같이exclusionByResourceTypes의resourceTypes필드에서 하나 이상의 제외할 리소스 유형을 전달합니다.{ "allSupported": false, "exclusionByResourceTypes": { "resourceTypes": [ "AWS::Redshift::ClusterSnapshot", "AWS::RDS::DBClusterSnapshot", "AWS::CloudFront::StreamingDistribution" ] }, "includeGlobalResourceTypes": false, "recordingStrategy": { "useOnly": "EXCLUSION_BY_RESOURCE_TYPES" }, }이러한 필드에 대한 자세한 내용은 AWS CLI 명령 참조의
put-configuration-recorder섹션을 참조하세요. -
(선택 사항) 고객 관리형 구성 레코더에 원하는 설정이 있는지 확인하려면 다음
describe-configuration-recorders명령을 사용합니다.$aws configservice describe-configuration-recorders다음은 응답의 예입니다.
{ "ConfigurationRecorders": [ { "name": "default", "recordingGroup": { "allSupported": false, "exclusionByResourceTypes": { "resourceTypes": [ "AWS::Redshift::ClusterSnapshot", "AWS::RDS::DBClusterSnapshot", "AWS::CloudFront::StreamingDistribution" ] }, "includeGlobalResourceTypes": false, "recordingStrategy": { "useOnly": "EXCLUSION_BY_RESOURCE_TYPES" }, "resourceTypes": [], }, "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override, "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] }, "roleARN": "arn:aws:iam::123456789012:role/config-role" } ] }
-
- Record specific resource types
-
사용자가 지정한 리소스 유형에 대한 구성 변경만 기록하도록 AWS Config를 설정합니다.
리소스 유형에 대한 기록을 중지하도록 선택하면 이미 기록된 구성 항목은 변경되지 않습니다. 지원되는 리소스 유형 목록은 지원되는 리소스 유형 섹션을 참조하세요.
-
put-configuration-recorder명령을 사용합니다.이 명령은
--configuration-recorder및---recording-group필드를 사용합니다.$ aws configservice put-configuration-recorder \ --configuration-recorderfile://configurationRecorder.json\ --recording-groupfile://recordingGroup.jsonconfiguration-recorder필드configurationRecorder.json파일이name,roleArn및 구성 레코더(recordingMode)의 기본 기록 빈도를 지정합니다.{ "name": "default", "roleARN": "arn:aws:iam::123456789012:role/config-role", "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override", "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] } }recording-group필드recordingGroup.json파일은 AWS Config가 기록할 리소스 유형을 지정합니다. 다음 예제와 같이resourceTypes필드에서 하나 이상의 제외할 리소스 유형을 전달합니다.{ "allSupported": false, "recordingStrategy": { "useOnly": "INCLUSION_BY_RESOURCE_TYPES" }, "includeGlobalResourceTypes": false, "resourceTypes": [ "AWS::EC2::EIP", "AWS::EC2::Instance", "AWS::EC2::NetworkAcl", "AWS::EC2::SecurityGroup", "AWS::CloudTrail::Trail", "AWS::EC2::Volume", "AWS::EC2::VPC", "AWS::IAM::User", "AWS::IAM::Policy" ] }이러한 필드에 대한 자세한 내용은 AWS CLI 명령 참조의
put-configuration-recorder섹션을 참조하세요. -
(선택 사항) 고객 관리형 구성 레코더에 원하는 설정이 있는지 확인하려면 다음
describe-configuration-recorders명령을 사용합니다.$aws configservice describe-configuration-recorders다음은 응답의 예입니다.
{ "ConfigurationRecorders": [ { "name": "default", "recordingGroup": { "allSupported": false, "exclusionByResourceTypes": { "resourceTypes": [] }, "includeGlobalResourceTypes": false "recordingStrategy": { "useOnly": "INCLUSION_BY_RESOURCE_TYPES" }, "resourceTypes": [ "AWS::EC2::EIP", "AWS::EC2::Instance", "AWS::EC2::NetworkAcl", "AWS::EC2::SecurityGroup", "AWS::CloudTrail::Trail", "AWS::EC2::Volume", "AWS::EC2::VPC", "AWS::IAM::User", "AWS::IAM::Policy" ] }, "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override, "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] }, "roleARN": "arn:aws:iam::123456789012:role/config-role" } ] }
-