I don’t believe that is possible. There may have been some changes to enable it, but typically you can’t apply values from the resource in actions.
That said, you could use a filter to find all EC2s that start with “prod3” and then update the env tag value to “prod3”.
You would need additional policies for “prod1”, “prod2”, “dev1”, “dev2”, etc.