List of usage examples for com.amazonaws.services.ec2.model IamInstanceProfileSpecification getName
public String getName()
The name of the instance profile.
From source file:de.tuhrig.deployman.launch.Launcher.java
private CreateLaunchConfigurationRequest createLaunchConfigurationRequest(Formation formation) { Machine machine = formation.getMachine(); Scaling scaling = machine.getScaling(); Properties generalProperties = getMetaInformationProperties(formation); CloudInitScript initScript = getParallelCloudInitScript(machine, generalProperties); IamInstanceProfileSpecification profil = this.ec2Client .getIamInstanceProfileSpecification(getUserProperty(REPO_PROFILE)); return new CreateLaunchConfigurationRequest().withLaunchConfigurationName(scaling.getName()) .withInstanceType(machine.getInstanceType()).withImageId(machine.getImageId()) .withUserData(initScript.renderAsBase64()).withSecurityGroups(machine.getSecurityGroup()) .withIamInstanceProfile(profil.getName()) // the name NOT the ARN! .withKeyName(getUserProperty(EC2_INSTANCE_KEY)) .withInstanceMonitoring(new InstanceMonitoring().withEnabled(false)); }