Error Policy Policy_Name doesn't exist attached to account may be printed into CPM server log du

Error "Policy "Policy_Name" doesn't exist/attached to account" may be printed into CPM server log during the tag scanning operation

The following may be printed into the CPM server log during the tag scanning operation:
ERROR:  manage_account_tagged_resources(.\cpmserver\cpm\backup_tag.py:336)  Policy_Name doesn't exist/attached to account

To resolve: Find error in CPM server logs, then scroll up to see account looking for policy. Once AWS account name is obtained, search in that account in the AWS console EC2 "Tags" section for the key and value field. Key field is "cpm backup" and value field will be the policy name. The AWS account name is found in a statement like below example, printed before the error above. To easily find AWS account name do a search before the above error for "Scan Tags for account".
INFO:  manage_account_tagged_resources(.\cpmserver\cpm\backup_tag.py:107)  Scan tags for account Account_name (user: User_Name)

Option 1 - If volume/instance is mistakenly tagged to an incorrect policy name, please re-tag to a correct policy name that belongs to this AWS account.

Option 2 - If volume/instance is mistakenly tagged to a policy that doesn't exist, then either remove tag or re-tag to a correct policy name that belongs to this AWS account.

Option 3 - If you have multiple accounts seeing the same resources please see chapter 13.4.1 "Pitfalls" in our CPM User Guide:https://docs.n2ws.com/user-guide/14-tag-based-backup-management#14-4-pitfalls-and-troubleshooting

Tools you an use to locate tags in AWS to alleviate the message above:
1. Open EC2 Console in AWS and browse to Instances in left hand pane.

2. In the Filter section please enter the name of the Policy that your received the error. This should return the instances that have the tag you searched for. When the search returns select an instance by checking the box next to it and then select the Tags field.

3. Remove or edit the tag that caused the error by clicking on Add/Edit Tags.

4. You can delete or edit the tags as needed. 
5. Then open CPM Manager and select General Settings at the top of the screen  and select the Tag Scan section.

6. Please run a Scan Now Job. When completed open the "Show Log" to verify the error is gone. 


Note: You may need to repeat this process if the error persists in the scan log and instead of EC2 instances search the EC2:Volumes, EC2:Ami's , EC2:Snapshots ect. Then rerun the Scan and verify the errors are not present.

You also have the option if you are using Resource Groups in AWS to utilize the AWS Tag Editor to search for EC2 items that may have the Tag you are looking to delete. For more details on the use of the Tag Editor please see this link: