public static AmazonEC2 createEc2Client ( Map < String , String > targetProperties ) throws TargetException { parseProperties ( targetProperties ) ; // Configure the IaaS client AWSCredentials credentials = new BasicAWSCredentials ( targetProperties . get ( Ec2Constants . EC2_ACCESS_KEY ) , targetProperties . get ( Ec2Constants . EC2_SECRET_KEY ) ) ; AmazonEC2 ec2 = new AmazonEC2Client ( credentials ) ; ec2 . setEndpoint ( targetProperties . get ( Ec2Constants . EC2_ENDPOINT ) ) ; return ec2 ; }
Creates a client for EC2 .