diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java b/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java index b92d72579a..54a8b6b2bc 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java +++ b/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java @@ -36,6 +36,9 @@ public class EC2PopulateDefaultLoginCredentialsForImageStrategy implements @Override public Credentials execute(Object resourceToAuthenticate) { + if (resourceToAuthenticate == null) + return new Credentials("root", null); + checkArgument(resourceToAuthenticate instanceof Image, "Resource must be an image (for EC2)"); Image image = (Image) resourceToAuthenticate;