AWS Import/Export
Developer Guide (API Version 2010-06-03)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Creating an Amazon S3 Import Job Using the REST API

If your application requires programmatic access to AWS Import/Export and the AWS SDK does not meet your requirements you can program directly using the REST API.

To create a job using the API

  1. Use a text editor to create a manifest file.

    Following is an example manifest file.

    manifestVersion: 2.0
    bucket: myBucket
    accessKeyId: AKIAIOSFODNN7EXAMPLE 
    deviceId: myDeviceSerialNumber ABCD
    eraseDevice: no
    returnAddress:
      name: Amazon.com ATTN Joe Random 
      street1: 1111 Nosuch Ave S.
      city: Seattle
      stateOrProvince: WA
      postalCode: 91111
      phoneNumber: 206-266-0000
      country: USA

    For more information, see Manifest File Options.

  2. URL encode the manifest file.

  3. Sign the request.

    For more information, go to Making HTTP Requests in the AWS Import/Export API Reference.

  4. Send a CreateJob request.

    Following is a sample create job request. The request includes the URL encoded manifest file in the body of the request as the Manifest option value. The request also shows the other required string parameters.

    POST / HTTP/1.1
    content-type:application/x-www-form-urlencoded;charset=utf-8
    host: https://importexport.amazonaws.com
    content-length:579
    
    Action=CreateJob&Manifest=manifestVersion%3A%202.0%0Abucket%3A%20myBucket​%0AaccessKeyId%3A%AKIAIOSFODNN7EXAMPLE%0​AreturnAddress%3A%0A%20%20%20%20name%3A%20Amazon.com%20ATTN%20Joe%20Random%20%0A%20%20%20%20​street1%3A%201200%2012th%20Ave%20S.%0A%20%20%20%20​city%3A%20Seattle%0A%20%20%20%20​stateOrProvince%3A%20WA%0A%20%20%20%20postalCode%3A%2098114%0A%20%20%20%20​phoneNumber%3A%20206-266-0000%0A%20%20%20%20​country%3A%20USA​JobType=Import&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE​SignatureVersion=2&SignatureMethod=HmacSHA256&Version=2010-06-01&Signature=%2FVfkltRBOoSUi1sWxRzN8rw%3D

    AWS Import/Export returns a job ID, the contents of your signature file, and the address to ship your storage device to.

  5. Save the signature value in a file named SIGNATURE in the root directory of your storage device.

  6. Save the JobId value so that you can use it in other requests regarding this job, and the AwsShippingAddress value so you know where to ship your device.

For more information about creating a job using the REST API, go to CreateJob in the AWS Import/Export API Reference. You can validate the manifest and parameter values without creating a job by setting the ValidateOnly parameter to true.