EC2-BUNDLE-INSTANCE(1)

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

πŸ’– EC2-BUNDLE-INSTANCE πŸ’–

okay bestie, gather round, because this is the manual page for ec2-bundle-instance β€” one of the EC2 API command line tools (version 1.6.14.1, api=2014-05-01, iykyk) ✨


✨ NAME ✨

ec2-bundle-instance β€” bundle a running instance on next reboot πŸŽ€


🌸 SYNOPSIS 🌸

ec2bundle ([ec2-bundle-instance])
ec2bundle [GENERAL OPTIONS] -b BUCKET -p PREFIX -o OWNER-AKID (-c
POLICY | -w OWNER-ACCESS-KEY) [OPTIONS] INSTANCE

πŸ’… GENERAL NOTES πŸ’…

okay so this is the little rule that applies EVERYWHERE, no cap: any command option or parameter can be handed a value of -, and that means "bestie, read the values for that option from stdin" 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: you bundle a running instance into an AMI upon next reboot, and the image components get stored in S3. And the way it does that? It stores items in S3 on the user's behalf using a signed S3 upload policy. iconic behavior honestly ✨

Now, that upload policy and its corresponding signature β€” you can either pass them in as parameters, or let them be generated automatically if the Secret Access Key for the owner of the S3 bucket is available. The generated policy is valid for 24 hours by default. But also, if you hand over a policy and a Secret Access Key, then the provided policy is what gets signed and used. periodt πŸ’…

If a policy does get generated, use --verbose to display the policy πŸ‘€ (yes, look at it, it's right there).

And the bucket situation: the S3 bucket is created if it does not exist, and the user ec2-bundled-images@amazon.com is granted read permissions on the entire bucket. If you wanna skip those checks, use --no-bucket-setup 🧚


πŸ‘‘ GENERAL OPTIONS πŸ‘‘

  • -O, --aws-access-key KEY β€” the AWS Access Key ID. Defaults to the value of the AWS_ACCESS_KEY environment variable (if set).
  • -W, --aws-secret-key KEY β€” the AWS Secret Access Key. Defaults to the value of the AWS_SECRET_KEY environment variable (if set).
  • -T, --security-token TOKEN β€” the 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.
  • -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.
  • -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 the EC2_URL environment variable. This option defaults to the region specified by the EC2_URL environment variable, or us-east-1 if that environment variable is not set.
  • -D, --auth-dry-run β€” check if you can perform the requested action rather than actually performing it. (window shopping, but for permissions πŸ’…)
  • -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).
  • -b, --bucket BUCKET β€” the S3 bucket in which to place the image components. Bucket name should be in lower case (lowercase only, bestie, it's not a suggestion 🌸).
  • -p, --prefix PREFIX β€” prefix for the image component names being stored in S3.
  • -o, --owner-akid OWNER-ACCESS-KEY β€” AWS Access Key Id of the owner of BUCKET.
  • -w, --owner-sak OWNER-SECRET-KEY β€” AWS Secret Access Key of the owner of BUCKET, used to sign the upload policy. This parameter is required to generate a policy if --policy is not given, and to sign a given or generated policy if --policy-signature is not given. This parameter value is not sent to EC2 πŸ”’ (your secrets stay yours, periodt).
  • -c, --policy POLICY β€” plaintext or base-64 encoded upload policy for S3, allowing EC2 to place items into S3 on the user's behalf. If this is not given, --owner-sak is required and an upload policy is generated and signed automatically. For more information on upload policies see the Amazon S3 Developer Guide.
  • -s, --policy-signature POLICY-SIG β€” base-64 encoded signature for the S3 upload policy. If --policy is given but this is omitted, --owner-sak is required and the policy is signed using that value.
  • -x, --expires HOURS β€” validity period for a generated upload policy, in hours. Defaults to 24.
  • -B, --no-bucket-setup β€” if the S3 bucket doesn't exist, don't create it. If the permissions aren't correct, don't attempt to fix them. (hands off, it's giving "I said what I said" πŸ™ˆ)
  • --location β€” the location of the destination Amazon S3 bucket.

🌈 SEE ALSO 🌈


and that's the whole page, bestie β€” this was the EC2 API command line tools, version 1.6.14.1, api=2014-05-01, manual section 1, for EC2-BUNDLE-INSTANCE πŸ’– go bundle something iconic, and remember: - means stdin, lowercase your buckets, and never leak your sak πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from