Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

BundleInstance

Description

Bundles an Amazon instance store-backed Windows instance.

During bundling, only the root device volume (C:\) is bundled. Data on other instance store volumes is not preserved.

Note

This procedure is not applicable for Linux/UNIX instances or Windows instances that are backed by Amazon EBS.

Request Parameters

InstanceId

The ID of the instance to bundle.

Type: String

Default: None

Required: Yes

Storage.S3.Bucket

The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

Type: String

Default: None

Required: Yes

Storage.S3.Prefix

The beginning of the file name of the AMI.

Type: String

Default: None

Required: Yes

Storage.S3.AWSAccessKeyId

The Access Key ID of the owner of the Amazon S3 bucket.

Type: String

Default: None

Required: Yes

Storage.S3.UploadPolicy

A Base64-encoded Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

Type: String

Default: None

Required: Yes

Storage.S3.UploadPolicySignature

The signature of the Base64 encoded JSON document.

Type: String

Default: None

Required: Yes

JSON Parameters

The upload policy gives Amazon EC2 limited permission to upload items into your Amazon S3 bucket. The following table describes the required parameters for the upload policy JSON document. Parameter names are case sensitive. For more information about upload policies and how to sign them, see the sections about policy construction and signatures in the Amazon Simple Storage Service Developer Guide.

expiration

The expiration of the policy. We recommend 12 hours or longer.

Required: Yes

conditions

A list of restrictions on what can be uploaded to Amazon S3. Must contain the bucket and ACL conditions in this table.

Required: Yes

bucket

The bucket to store the AMI.

Required: Yes

acl

This must be set to ec2-bundle-read.

Required: Yes

Response Elements

The following elements are returned in a BundleInstanceResponse element.

requestId

The ID of the request.

Type: xsd:string

bundleInstanceTask

The bundle task.

Type: BundleInstanceTaskType

Examples

Example Request

This example bundles the i-e468cd8d instance.

https://ec2.amazonaws.com/?Action=BundleInstance
&InstanceId=i-e468cd8d
&Storage.S3.AWSAccessKeyId='AKIAIOSFODNN7EXAMPLE'
&Storage.S3.Bucket=myawsbucket 
&Storage.S3.Prefix=winami
&Storage.S3.UploadPolicy=eyJleHBpcmF0aW9uIjogIjIwMDgtMDgtMzBUMDg6NDk6MDlaIiwiY29uZGl0aW9ucyI6IFt7ImJ1Y2tldCI6ICJteS1idWNrZXQifSxbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAibXktbmV3LWltYWdlIl0seyJhY2wiOiAiZWMyLWJ1bmRsZS1yZWFkIn1dfEXAMPLE
&Storage.S3.UploadPolicySignature=fh5tyyyQD8W4COEthj3nlGNEXAMPLE 
&AUTHPARAMS

Example Response

<BundleInstanceResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
  <bundleInstanceTask>
      <instanceId>i-12345678</instanceId>
      <bundleId>bun-c1a540a8</bundleId>
      <state>bundling</state>
      <startTime>2008-10-07T11:41:50.000Z</startTime>
      <updateTime>2008-10-07T11:51:50.000Z</updateTime>
      <progress>70%</progress>
      <storage>
        <S3>
          <bucket>myawsbucket</bucket>
          <prefix>winami</prefix>
        </S3>
      </storage>
  </bundleInstanceTask>
</BundleInstanceResponse>