Updated the location key checking to support the dynamic location keys for ec2