AWS Config에서 실패한 수정 작업 문제를 해결하려면 어떻게 해야 하나요?

2분 분량
0

AWS Config Rules에 따른 규정 미준수 AWS 리소스 문제 해결을 위한 지침을 따랐습니다. 하지만 수정 작업이 실패하고 AWS Config 콘솔에 작업 상태 오류 "작업 실행 실패(세부 정보)(Action execution failed (details))"가 표시됩니다. [세부 정보] 페이지를 열었지만 문제 해결에 필요한 정보가 충분하지 않습니다.

해결 방법

다음 지침에 따라 AWS 명령줄 인터페이스(AWS CLI) 또는 AWS CloudTrail 이벤트 기록을 사용하여 수정 작업 실패 문제를 해결합니다.

참고: AWS CLI 명령을 실행할 때 오류가 발생하는 경우, 최신 버전의 AWS CLI를 사용하고 있는지 확인하세요.

AWS CLI

1.    describe-remediation-execution-status에 대하여 다음과 유사하게 AWS 명령줄 인터페이스(AWS CLI) 명령을 실행하여 수정 작업 단계에 대한 보다 자세한 오류 메시지, 상태 및 타임스탬프를 봅니다.

aws configservice describe-remediation-execution-status \
     --config-rule-name example-rule \
     --region example-region \
     --resource-keys resourceType=example-resource-type,resourceId=example-resource-ID

참고: example-rule, example-region, example-resource-type, example-resource-ID를 AWS Config 규칙 이름, 리전, 리소스 유형 및 리소스 ID로 바꿉니다.

2.    그러면 다음과 유사한 출력이 나타납니다.

{
    "RemediationExecutionStatuses": [
        {
            "ResourceKey": {
                "resourceType": "AWS::EC2::Volume",
                "resourceId": "vol-0b399a24561582586"
            },
            "State": "FAILED",
            "StepDetails": [
                {
                    "Name": "createDocumentStack",
                    "State": "FAILED",
                    "ErrorMessage": "Automation Step Execution fails when it is creating a CloudFormation stack. 
Get Exception from CreateStack API of cloudformation Service. Exception Message from CreateStack API:
[User: arn:aws:sts::xxxxx:assumed-role/config-remediation-sshpublic-role-zkga0ot3/config-remediation-sshpublic is not authorized to perform: cloudformation:CreateStack 
on resource: arn:aws:cloudformation:eu-west-2:xxxxx:stack/DetachEBSVolumeStack2f6d3590-ea2c-424a-97ea-045749f07164/* 
(Service: AmazonCloudFormation; Status Code: 403; Error Code: AccessDenied; Request ID: b8f41dd6-9020-11e9-897d-f9719db1a9e6)]. 
Please refer to Automation Service Troubleshooting Guide for more diagnosis details.",
                    "StartTime": 1560680582.675,
                    "StopTime": 1560680582.884
                },
                {
                    "Name": "detachVolume",
                    "State": "PENDING"
                },
                {
                    "Name": "deleteCloudFormationTemplate",
                    "State": "PENDING"
                }
            ],
            "InvocationTime": 1560680582.419,
            "LastUpdatedTime": 1560680583.67
        }
    ]
}

3.    StepDetails 목록에서 오류 메시지와 실패 원인을 확인합니다.

CloudTrail 이벤트 기록

1.    AWS CloudTrail 콘솔을 엽니다.

2.    CloudTrail 콘솔에서 CloudTrail 이벤트 보기에 대한 지침을 따르세요.

3.    StartAutomationExecution API 작업은 AWS Config에서 수정 작업을 시작할 때 호출됩니다. 이벤트 이름StartAutomationExecution API로 필터링하고 이벤트 세부 정보 페이지에서 requestID를 복사합니다.

4.    [AWS Systems Manager 콘솔]을 열고 탐색 창에서 [자동화]을 선택합니다.

5.    requestID자동화 문서 검색 필드에 붙여 넣습니다.

6.    그런 다음 수행한 수정 작업을 찾습니다. 오류가 AWS Identity and Access Management(IAM) 권한, 구문 문제 또는 수정 작업에 구성된 잘못된 파라미터와 관련되어 있는지 확인합니다.


관련 정보

AWS Config 사용자에 대한 사용자 지정 권한 부여

AWS Config 콘솔 오류 메시지를 해결하려면 어떻게 해야야 하나요?

규칙 보기, 업데이트 및 삭제(AWS CLI)

AWS Config에서 문제 해결 작업을 삭제하려고 할 때 "NoSuchRemediationConfigurationException" 또는 "예상치 못한 내부 오류" 오류를 해결하려면 어떻게 해야 합니까?

AWS 공식
AWS 공식업데이트됨 3년 전