AmazonEC2Client ec2Client;
String assumeRole = config.accountService.getReservationAccessRoles().get(account);
if (assumeRole != null) {
String externalId = config.accountService.getReservationAccessExternalIds().get(account);
final Credentials credentials = AwsUtils.getAssumedCredentials(account.id, assumeRole, externalId);
ec2Client = new AmazonEC2Client(new AWSSessionCredentials() {
public String getAWSAccessKeyId() {
return credentials.getAccessKeyId();
}
public String getAWSSecretKey() {