MRFramework/src/main/java/com/mr/util/CreateInstances.java
/**
	 * This function sleeps and wait for instances to get terminated and then
	 * delete the security group
	 * 
	 * @throws InterruptedException
	 */
This function sleeps and wait for instances to get terminated and then
delete the security group


This function sleeps and wait for instances to get terminated and then delete the security group
private static void deleteSecurityGroup() throws InterruptedException {
		for (String s : activeInstances) {
			while (getInstanceStatus(s) != 48) {
				Thread.sleep(5000);
			}
			log.info(s + " = terminated");
		}
		DeleteSecurityGroupRequest d = new DeleteSecurityGroupRequest().withGroupName(securityGroupName);
		ec2.deleteSecurityGroup(d);
		log.info("Group Deleted");
	}
private static void deleteSecurityGroup ( ) throws InterruptedException { for ( String s : activeInstances ) { while ( getInstanceStatus ( s ) != 48 ) { Thread . sleep ( 5000 ) ; } log . info ( s + " = terminated" ) ; } DeleteSecurityGroupRequest d = new DeleteSecurityGroupRequest ( ) . withGroupName ( securityGroupName ) ; ec2 . deleteSecurityGroup ( d ) ; log . info ( "Group Deleted" ) ; }
This function sleeps and wait for instances to get terminated and then
 delete the security group
This function sleeps and wait for instances to get terminated and then delete the security group