The AWS Java SDK helps you code by providing Java APIs for 3DS OUTSCALE Cloud services.The single, downloadable package includes the AWS Java library, code samples, and documentation. 


To use the AWS SDK for Java, ensure that you have the following elements:

  • A suitable Java Development Environment. 
  • A 3DS OUTSCALE account and access keys. For more information, see Getting Started
  • 3DS OUTSCALE credentials (access keys) set in your environment or using the shared (by the AWS CLI and other SDKs) credentials file.

Linux and Windows Configuration

  1. Download the SDK from
  2. After downloading the SDK, extract the content into a local directory.

The SDK contains the following directories:

  • documentation  – Contains the API documentation, which is also available at the following address: AWS SDK for Java Reference.
  • lib  – Contains the SDK  .jar  files.
  • samples  – Contains working code samples that demonstrate how to use the SDK.
  • third-party  – Contains third-party libraries that are used by the SDK, such as Apache commons logging, AspectJ and the Spring framework.

To use the SDK, add the full path to the  lib and  third-party directories to the dependencies in your build file, and add them to your java  CLASSPATH  to run your code.


The AWS SDK for Java comes packaged with a number of code samples that demonstrate many of the features of the SDK in build-able, runnable programs that you can study or modify to implement your own 3DS OUTSCALE solutions using the AWS SDK for Java. 

If you want to run simple scripts, you can use Ant to easily build and run them from the command line.


To initialize your connector on the 3DS OUTSCALE endpoint, you need to create your EC2 connection using the following code:

amazonEC2 = new AmazonEC2Client(credentials);

Replace _REGION_NAME_ with the Region you want to use.

Credentials will be loaded from the default location (~/.aws/credentials)
You can get your Access Key and your Secret Key from Cockpit to allow a connection to the API. For more information, see Managing Your Access Keys.


In this sample, we use an EC2 client to get a list of all the Availability Zones, and all instances sorted by reservation ID:

try {
	DescribeAvailabilityZonesResult availabilityZonesResult = ec2.describeAvailabilityZones();
    System.out.println("You have access to " + availabilityZonesResult.getAvailabilityZones().size() + " Availability Zones.");
	DescribeInstancesResult describeInstancesRequest = ec2.describeInstances();
    List<Reservation> reservations = describeInstancesRequest.getReservations();
    Set<Instance> instances = new HashSet<Instance>();

    for (Reservation reservation : reservations) {

    System.out.println("You have " + instances.size() + " Outscale EC2 instance(s) running.");
		} catch (AmazonServiceException ase) {
	System.out.println("Caught Exception: " + ase.getMessage());
		System.out.println("Reponse Status Code: " + ase.getStatusCode());
        System.out.println("Error Code: " + ase.getErrorCode());
        System.out.println("Request ID: " + ase.getRequestId());

To create a VPC:

  1. Import the following libraries: 

  2. Execute the following code: 

    System.out.println("Creating VPC...");
    CreateVpcRequest newVPC = new CreateVpcRequest("");
    CreateVpcResult res = ec2.createVpc(newVPC);
    Vpc vpc = res.getVpc();
    String vpcId = vp.getVpcId();
    System.out.println("Created VPC " + vpcId);

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.

Windows® is a registered trademark of Microsoft Corporation in the United States and/or other countries.