I've experienced the same "dangling tags" misbehavior, referenced at repost.aws and in the boto3 project. In my case I have some extra data since I'm using a script in an attempt to sanity check actual state after executing IaC destroy processes:
echo "Scanning account for profile ${AWS_PROFILE} for all resources.."
REGIONS="us-east-1 us-east-2 us-west-1 us-west-2"
for _REGION in $REGIONS ; do
printf "Dumping all resources in ${GREEN}${_REGION}${RESET} for profile ${AWS_PROFILE} into file: all-resources-in-${GREEN}${_REGION}${RESET}.json.."
aws resourcegroupstaggingapi get-resources --region $_REGION > all-resources-in-${_REGION}.json
echo ". found ${GREEN}$(grep ResourceARN all-resources-in-${_REGION}.json | wc -l) ${RESET}ResourceARNs"
done
My only addition to the conversation here is that there appears to be a clear pattern that only some resources seem to stick around after deletion. In my current project, I've only noticed the following resources with "sticky tags":
- NAT Gateways
- Security Groups
...and of these, 1. NAT Gateways are the most sticky. I regularly observe that the Security Groups drop off the list first, then the NAT Gateways. Perhaps this is a hint about root cause, or perhaps it's a red herring.
Note that this is in a terraform project that is creating/destroying of course but a tiny subset of AWS resource types, but it does include at least: VPCs, Subnets, RTs, IGW, NatGw, SGs, ACLs, EC2, EKS, Managed Node Groups, ElasticIps, LaunchTemplates, AutoscalingGroups, etc..
So, I'm proposing that you identify which resource types are consistently "sticky" in your environment, and filter those out.