AWS Config와 연결된 문제 해결 작업을 삭제하면 다음 중 하나와 유사한 오류가 표시됩니다.
AWS 명령줄 인터페이스(AWS CLI) 명령 delete-remediation-configuration 사용:
"DeleteRemediationConfiguration 작업 호출 시 오류 발생(NoSuchRemediationConfigurationException): No RemediationConfiguration for rule exists(규칙에 대한 문제 해결 구성이 없습니다)."
-또는-
AWS Management Console 사용:
"An unexpected internal error occurred with AWS Config. Try again or contact AWS Support if the error persists(AWS Config에 예기치 않은 내부 오류가 발생했습니다. 오류가 계속되면 다시 시도하거나 AWS Support에 문의하세요)."
이 오류를 해결하려면 어떻게 해야 합니까?
간략한 설명
이 오류 메시지는 PutRemediationConfiguration API 호출 ResourceType 파라미터가 생성될 때는 지정되었지만 삭제될 때는 지정되지 않았기 때문에 발생합니다. PutRemediationConfiguration API에서 ResourceType 파라미터를 사용하는 경우 DeleteRemediationConfiguration API에서도 ResourceType 파라미터를 사용해야 합니다.
참고: PutRemediationConfiguration에 대한 리소스 유형을 제공하지 않으면 기본값은 ResourceType=*입니다.
해결 방법
다음 지침에 따라 AWS Config 규칙에 연결된 리소스 유형을 삭제합니다.
중요: 시작하기 전에 최신 버전의 AWS CLI가 설치 및 구성되었는지 확인합니다.
1. AWS CLI 명령 describe-remediation-configurations를 실행하여 PutRemediationConfiguration과 함께 사용되는 리소스 유형을 확인합니다.
참고: example-config-rule-name을 AWS Config 규칙 이름으로 바꿉니다.
aws configservice describe-remediation-configurations --config-rule-names example-config-rule-name
2. 그러면 다음과 유사한 출력이 나타납니다.
{
"RemediationConfigurations": [
{
"TargetType": "SSM_DOCUMENT",
"MaximumAutomaticAttempts": 5,
"Parameters": {
"AutomationAssumeRole": {
"StaticValue": {
"Values": [
"arn:aws:iam::example-accoun-Id:role/example-IAM-role"
]
}
},
"BucketName": {
"ResourceValue": {
"Value": "RESOURCE_ID"
}
},
"SSEAlgorithm": {
"StaticValue": {
"Values": [
"AES256"
]
}
}
},
"Config-rule-name": "example-Config-rule-name",
"ResourceType": "AWS::S3::Bucket",
"TargetId": "AWS-EnableS3BucketEncryption",
"RetryAttemptSeconds": 60,
"Automatic": true,
"Arn": "arn:aws:config:example-region:example-account-ID:remediation-configuration/example-config-rule-name/7467e289-f789-4b99-a848-deeeb3e90a0e"
}
]
}
참고: 이 예에서 리소스 유형은 AWS::S3::Bucket입니다.
3. AWS CLI 명령 delete-remediation-configuration을 실행합니다.
참고: example-config-rule-name, example-resource-type 및 example-region을 AWS Config 규칙 이름, 리소스 이름, 리소스 유형 및 AWS 리전으로 바꿉니다.
aws configservice delete-remediation-configuration --config-rule-name example-config-rule-name --resource-type example-resource-type --region example-region
AWS Config 규칙에 연결된 문제 해결 작업이 삭제됩니다. 이제 AWS Config 규칙을 삭제할 수 있습니다.
관련 정보
AWS Config에서 실패한 문제 해결 실행 문제를 해결하려면 어떻게 해야 합니까?
delete-config-rule
문제 해결 작업 삭제(콘솔)