From b00c243786e2ab35b6d4a917404992b2a2060276 Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Tue, 10 Mar 2015 17:52:07 -0700 Subject: [PATCH] Need a null check for iamProfile. --- .../indexing/overlord/autoscaling/ec2/EC2AutoScaler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ec2/EC2AutoScaler.java b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ec2/EC2AutoScaler.java index 6663b7ea4c4..f4d84cfdd42 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ec2/EC2AutoScaler.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ec2/EC2AutoScaler.java @@ -118,7 +118,11 @@ public class EC2AutoScaler implements AutoScaler .withPlacement(new Placement(envConfig.getAvailabilityZone())) .withKeyName(workerConfig.getKeyName()) .withSubnetId(workerConfig.getSubnetId()) - .withIamInstanceProfile(workerConfig.getIamProfile().toIamInstanceProfileSpecification()) + .withIamInstanceProfile( + workerConfig.getIamProfile() == null + ? null + : workerConfig.getIamProfile().toIamInstanceProfileSpecification() + ) .withUserData(userDataBase64) );