Amazon Elastic Compute Cloud
CLI Reference (API Version 2011-12-15)
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...

ec2-upload-bundle

Description

Upload a bundled AMI to Amazon S3 storage.

Syntax

ec2-upload-bundle -b s3_bucket -m manifest -a access_key_id -s secret_key [--acl acl] [-d directory] [--part part] [--location location] [--url url] [--retry] [--skipmanifest]

Options

OptionDescriptionRequired

-b, --bucket s3_bucket

The name of the Amazon S3 bucket ins which to store the bundle, followed by an optional '/'-delimited path prefix. If the bucket doesn't exist it will be created (if the bucket name is available).

Example: -b ec2-bucket/ami-001

Yes

-m, --manifest manifest

The path to the manifest file. The manifest file is created during the bundling process and can be found in the directory containing the bundle.

Example: -m image.manifest.xml

Yes

-a, --access-key access_key_id

Your AWS access key ID.

Example: -a AKIADQKE4SARGYLE

Yes

-s, --secret-key secret_key

Your AWS secret access key.

Example: -s eW91dHViZS5jb20vd2F0Y2g/dj1SU3NKMTlzeTNKSQ==

Yes

--acl acl

The access control list policy of the bundled image.

Valid Values: public-read | aws-exec-read

Default: aws-exec-read

Example: --acl public-read

No

-d, --directory directory

The directory containing the bundled AMI parts.

Default: The directory containing the manifest file (see the -m option).

Example: -d /var/run/my-bundle

No

--part part

Starts uploading the specified part and all subsequent parts.

Example: --part 04

No

--location location

The location of the destination Amazon S3 bucket.

If the bucket exists and you specify a location that doesn't match the bucket's actual location, the tool exits with an error. If the bucket exists and you don't specify a location, the tool uses the bucket's location. If the bucket does not exist and you specify a location, the tool creates the bucket in the specified location. If the bucket does not exist and you don't specify a location, the tool creates the bucket without a location constraint (in the US).

Valid Values: US | EU | us-west-1 | ap-southeast-1

Default: US

Example: --location EU

No

--url url

The S3 service URL.

Default: https://s3.amazonaws.com

Example: --url https://s3.amazonaws.ie

No

--retry

Automatically retries on all Amazon S3 errors, up to five times per operation.

Example: --retry

No

--skipmanifest

Does not upload the manifest.

Example: --skipmanifest

No

Output

Amazon EC2 displays status messages that indicate the stages and status of the upload process.

Example

This example uploads the bundle specified by the bundled/fred.manifest.xml manifest.

$ ec2-upload-bundle -b my-s3-bucket -m bundled/fred.manifest.xml -a AKIADQKE4SARGYLE -s eW91dHViZS5jb20vd2F0Y2g/dj1SU3NKMTlzeTNKSQ==
Creating bucket...
Uploading bundled image parts to the S3 bucket my-s3-bucket ...
Uploaded fred.part.00
Uploaded fred.part.01
Uploaded fred.part.02
Uploaded fred.part.03
Uploaded fred.part.04
Uploaded fred.part.05
Uploaded fred.part.06
Uploaded fred.part.07
Uploaded fred.part.08
Uploaded fred.part.09
Uploaded fred.part.10
Uploaded fred.part.11
Uploaded fred.part.12
Uploaded fred.part.13
Uploaded fred.part.14
Uploading manifest ...
Uploaded manifest.
Bundle upload completed.