Archive

Posts Tagged ‘AWS’

VMworld 2016 and vSearch 3.0 Preview

August 16th, 2016 4 comments

The VMworld 2016 is coming in about two weeks. Although I’ve attended every single VMworld after 2007, it’s my first time as an exhibitor myself, to be exact, as a new innovator in the show. If you follow my blog and Twitter, you probably have know the company DoubleCloud that I had founded and the cool products/technologies we’ve been working on. This is the first year for us to promote our products in show. Please come to see our product demos, or simply stop by and say hi. Our booth is 841#4.

Amazon Web Service Java SDK Tutorial: List All Networks

March 8th, 2016 1 comment

In my previous posts, I showed samples on virtual machine creation, virtual machine instances listing, storage volume listing. This sample shows how to list all the networks that you have.

With the information about your networks, you can get all the private and public IP addresses.

To run the following sample, you can check out the previous post for the pom.xml file and how to get AWS credentials from AWS console.

ae9b83421945a96d5479be790d56da19000

Amazon Web Service Java SDK Tutorial: List All Volumes

March 7th, 2016 3 comments

In my previous posts, I showed samples on how to create a new virtual machine instance, and how to list all the virtual machine instances you own. This sample shows how to list all the disk volumes that you have.

To run the following sample, you can check out the previous posts for the pom.xml file and how to get AWS credentials from AWS console.

package org.doublecloud.awssample;
 
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.PropertiesCredentials;
import com.amazonaws.services.ec2.AmazonEC2;
import com.amazonaws.services.ec2.AmazonEC2Client;
import com.amazonaws.services.ec2.model.DescribeVolumesResult;
import com.amazonaws.services.ec2.model.Volume;
 
public class AwsEc2ListVolumes
{
  public static void main(String[] args) throws Exception
  {
    AWSCredentials credentials = new PropertiesCredentials(AwsEc2ListVolumes.class.getResourceAsStream("/AwsCredentials.properties"));
    AmazonEC2 ec2 = new AmazonEC2Client(credentials);
 
    DescribeVolumesResult volReq = ec2.describeVolumes();
 
    int count = 1;
    for (Volume vol : volReq.getVolumes())
    {
      System.out.println("Volume " + count   + "\n Details: " + vol);
      count++;
    }
  }
}

The output will be something as follows:

Amazon Web Service Java SDK Tutorial: Create New Virtual Machine

March 2nd, 2016 No comments

In my previous post, I showed a sample on how to list virtual machine instances. While that is helpful, maybe even more so is to create a new virtual machine. Here comes another sample that creates new virtual machine instance using the Amazon Java SDK.

Amazon Web Service Java SDK Tutorial: Simplest Hello World

February 17th, 2016 2 comments

I looked at Amazon Web Services SDK a while back and started to work with it recently. While searching it the Internet, I got all the results on the first two pages on Google pointing back to Amazon, which is great. After reading these documents, however, I got headaches. Why? For one thing, they are pretty long and sometimes run over different Web pages. Do you want to read for an hour to get your first program running? Or you are like me who would like to get my first program like Hello World to run in 5 minutes or even shorter. We should then read more if we don’t understand some parts. If you have gone through the Amazon documents, you’d know it’s impossible.

Microsoft Management Summit 2013: Hyper-V vs. vSphere, AWS, Hands On Labs

April 11th, 2013 6 comments

I flew to Vegas this week for Microsoft Management Summit 2013, which happens to be in the same hotel (Mandalay Bay) as VMware Partner Exchange one and half months ago. The organizations and activities of both conferences are pretty similar – keynotes, breakout sessions, hands on labs (HOL). It’s pretty exciting to learn new technologies and meet new people.

Hands On Labs

Amazon AWS SDK for Java: It’s Not Quite There Yet

April 15th, 2010 1 comment

Amazon released its SDK for Java last month. It’s a complete set of APIs that cover almost all the services from EC2, S3, SQS, RDS to SimpleDB. Overall Amazon has done a consistent job, but the SDK is NOT really object oriented. And that I think is critical for higher development productivity. 

Structure of the SDK

Before explaining why it’s not quite there, let’s take a look at the structure of the API itself. The SDK includes many packages. For each service, you find two or three packages: basic, model, and possibly util package.

In each of the basic packages you can find the two interfaces, and two implementation classes. Let’s pick EC2 as a sample here. The AmazonEC2 and AmazonEC2Async are two interfaces and implemented by AmazonEC2Client and AmazonEC2AsyncClient respectively. More methods are defined in the synchronous than the asynchronous versions with the majority of them overlapping with similar method names.

AllocateAddressResult allocateAddress()
AllocateAddressResult allocateAddress(AllocateAddressRequest allocateAddressRequest)
Future<AllocateAddressResult> allocateAddressAsync(AllocateAddressRequest allocateAddressRequest)

The first two versions wait and get you results upon return. The third version doesn’t wait and gets the result later.