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) );