I'm using AWS java sdk and need to delete a CloudWatch rule which is trigger a AWS Lambda function. The deletion of the CloudWatch rule was successful using below code. But there is a reference exist in the Lambda function and Lambda AWS console displays the CloudWatch rule as deleted and is displays a "Delete" icon to delete it. Any one know how to remove the reference to the CloudWatch rule from the Lambda function using Java SDK?
cloudWatchEvent.removeTargets(removeTargetsRequest);
cloudWatchEvent.deleteRule(deleteRequest);