When I delete a remediation action associated with an AWS config, I receive an error similar to one of the following:
Using the AWS Command Line Interface (AWS CLI) command delete-remediation-configuration:
"An error occurred (NoSuchRemediationConfigurationException) when calling the DeleteRemediationConfiguration operation: No RemediationConfiguration for rule exists."
Using the AWS Management Console:
"An unexpected internal error occurred with AWS Config. Try again or contact AWS Support if the error persists."
How do I resolve this error?
This error message occurs because the PutRemediationConfiguration API call ResourceType parameter was specified in creation but not in deletion. If you use the ResourceType parameter in the PutRemediationConfiguration API, you must also use the ResourceType parameter in the DeleteRemediationConfiguration API.
Note: If no resource type is provided for PutRemediationConfiguration, the default is ResourceType=*.
Follow these instructions to delete the resource type associated with your AWS Config rule.
Important: Before you begin, be sure that you have the latest version of the AWS CLI installed and configured.
1. Run the AWS CLI command describe-remediation-configurations to identify the resource type that is used with PutRemediationConfiguration:
Note: Replace example-config-rule-name with your AWS Config rule name.
aws configservice describe-remediation-configurations --config-rule-names example-config-rule-name
2. You receive an output similar to the following:
Note: In this example, the resource type is AWS::S3::Bucket.
3. Run the AWS CLI command delete-remediation-configuration:
Note: Replace example-config-rule-name, example-resource-type, and example-region with your AWS Config rule name, resource type, and AWS Region.
aws configservice delete-remediation-configuration --config-rule-name example-config-rule-name --resource-type example-resource-type --region example-region
The remediation action associated with your AWS Config rule deletes successfully. You can now delete the AWS Config rule.
How can I troubleshoot failed remediation executions in AWS Config?
Delete remediation action (console)