EC2Client.java can be a interface or abstract class and add some impl class of EC2Client.java by region(EastEC2Client.java\WestEC2Client.java). All of subclass of EC2Client.java can be put in a map when startup. "MyService" injected the map. can choose a region ec2client from the map in the service. enter image description here