EC2-CREATE-I...E-EXPORT-TASK(1)

πŸ“¦ version 1.6.14.1, in ubuntu jammy, ubuntu noble

πŸ’– ec2-create-instance-export-task(1) πŸ’–

okay bestie, welcome to the User Commands corner of the manual β€” this one's a lil tool from the EC2 API command line tools crew, and it's literally the "yeet my instance into S3" button. let's get into it πŸ¦‹


✨ NAME ✨

ec2-create-instance-export-task β€” initiate an instance export task to export a running or stopped

yes the sentence ends there, that's not me being lazy, that's the manual being the manual πŸ’€

✨ SYNOPSIS ✨

ec2addixt ([ec2addixt, ec2-create-instance-export-task])
ec2addixt [GENERAL OPTIONS] INSTANCE -e TARGET_ENVIRONMENT -f DISK_IMAGE_FORMAT [-c CONTAINER_FORMAT] -b S3_BUCKET [-p S3_PREFIX] [-d DESCRIPTION]

✨ GENERAL NOTES ✨

  • Any command option/parameter may be passed a value of - to indicate that values for that option should be read from stdin.
no cap, that - trick is giving "don't hardcode ur secrets in shell history" energy and honestly? iconic 🫢

✨ DESCRIPTION ✨

Initiate an instance export task to export a running or stopped instance to a file in S3.

The INSTANCE parameter specifies the instance to export.

The instance will be rebooted once, in the same fashion as ec2-create-image.

Temporary AMIs or snapshots of the instance and its attached volumes may be created under your account during the initial phase of the export task. They will be deleted automatically when they are no longer needed for the export task.

bestie the reboot is real, ok? it's one reboot, in the same fashion as ec2-create-image, and then it's done. plan accordingly 😭

✨ GENERAL OPTIONS ✨

  • -O, --aws-access-key KEY β€” AWS Access Key ID. Defaults to the value of the AWS_ACCESS_KEY environment variable (if set).
  • -W, --aws-secret-key KEY β€” AWS Secret Access Key. Defaults to the value of the AWS_SECRET_KEY environment variable (if set).
  • -T, --security-token TOKEN β€” AWS delegation token. Defaults to the value of the AWS_DELEGATION_TOKEN environment variable (if set).
  • -K, --private-key KEY β€” [DEPRECATED] Specify KEY as the private key to use. Defaults to the value of the EC2_PRIVATE_KEY environment variable (if set). Overrides the default.
deprecated bestie, we're not using it, but it's here so u know it exists πŸ™ˆ
  • -C, --cert CERT β€” [DEPRECATED] Specify CERT as the X509 certificate to use. Defaults to the value of the EC2_CERT environment variable (if set). Overrides the default.
also deprecated. also still listed. that's just how it is πŸ’…
  • -U, --url URL β€” Specify URL as the web service URL to use. Defaults to the value of https://ec2.amazonaws.com (us-east-1) or to that of the EC2_URL environment variable (if set). Overrides the default.
  • --region REGION β€” Specify REGION as the web service region to use. This option will override the URL specified by the -U URL option and EC2_URL environment variable. This option defaults to the region specified by the EC2_URL environment variable or us-east-1 if this environment variable is not set.
ok so --region is the main character here, it overrides both -U URL and EC2_URL. it's giving "I said what I said" πŸ‘‘
  • -D, --auth-dry-run β€” Check if you can perform the requested action rather than actually performing it.
  • -v, --verbose β€” Verbose output.
  • -?, --help β€” Display this help.
  • -H, --headers β€” Display column headers.
  • --debug β€” Display additional debugging information.
  • --show-empty-fields β€” Indicate empty fields.
  • --hide-tags β€” Do not display tags for tagged resources.
  • --connection-timeout TIMEOUT β€” Specify a connection timeout TIMEOUT (in seconds).
  • --request-timeout TIMEOUT β€” Specify a request timeout TIMEOUT (in seconds).

✨ SPECIFIC OPTIONS ✨

  • -f, --disk-image-format DISK-IMAGE-FORMAT β€” The file format of the disk image. Refer to the latest Developer's Guide for valid values. [OPTIONAL]
  • -e, --target-environment TARGET-ENVIRONMENT β€” The target environment. Refer to the latest Developer's Guide for valid values. [REQUIRED]
  • -c, --container-format CONTAINER-FORMAT β€” The container format used to combine disk images with metadata. If absent, only the disk image will be exported. [OPTIONAL]
  • -b, --s3-bucket S3-BUCKET β€” S3 destination bucket name for the exported file. The target bucket must grant WRITE and READ_ACL permissions to the vm-import-export@amazon.com AWS account. [REQUIRED]
⚠️ not me reminding u twice but: that bucket must grant WRITE and READ_ACL to vm-import-export@amazon.com. no perms, no export. periodt.
  • -p, --s3-prefix S3-PREFIX β€” Initial part of the S3 key (object name) used for the exported file. Maximum length is 1000 bytes of UTF-8. [OPTIONAL]
  • -d, --description DESCRIPTION β€” A free-form comment that will be returned verbatim during subsequent calls to ec2-describe-export-tasks. Maximum length is 255 characters. [OPTIONAL]

✨ SEE ALSO ✨


k that's the whole thing bestie, go export ur instance and slay πŸ’–βœ¨πŸŽ€πŸ¦‹

EC2 API command line tools 1.6.14.1 api=2014-05 β€” mwah, ilysm, stay hydrated, and remember: [REQUIRED] means required fr fr πŸ’…πŸŒΈ

πŸ“¦ where this page comes from