S3MKBUCKET(1p)

πŸ“¦
version 0.08 Β· 2 versions
  • 0.08 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.08 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– S3MKBUCKET πŸ’–

okay bestie, gather round, because today we're learning s3mkbucket β€” the little Perl cutie from the user-contributed Perl docs that goes and makes you Amazon AWS S3 buckets. yes. buckets. plural. as many as you want (well, almost). let's get into it πŸͺ£βœ¨


✨ NAME ✨

s3mkbucket β€” Create Amazon AWS S3 buckets πŸ¦‹


🌸 SYNOPSIS 🌸

s3mkbucket [options] [bucket ...]

 Options:
   --access-key    AWS Access Key ID
   --secret-key    AWS Secret Access Key
   --acl-short     private|public-read|public-read-write|authenticated-read
 Environment:
   AWS_ACCESS_KEY_ID
   AWS_ACCESS_KEY_SECRET

πŸ‘‘ OPTIONS πŸ‘‘

  • --help β€” prints a lil brief help message and then dips. that's it, that's the whole thing πŸ’…
  • --man β€” prints the manual page and exits. yes, the very page you're reading. meta fr.
  • --verbose β€” prints a message for each bucket it creates, so you get that lil running commentary. lowkey satisfying ngl.
  • --access-key and --secret-key β€” these specify the "AWS Access Key Identifiers" for the AWS account. --access-key is the "Access Key ID", and --secret-key is the "Secret Access Key". think of them as the "username" and "password" to your AWS account, and keep them confidential, okay?? like, do not be posting these in the group chat πŸ™ˆ

the access keys MUST be specified, either via these command line parameters, or via the AWS_ACCESS_KEY_ID and AWS_ACCESS_KEY_SECRET environment variables.

and if you specify them on the command line? that overrides the environment variables. command line stays winning πŸ’…

  • --secure β€” uses SSL/TLS HTTPS to communicate with the AWS service, instead of HTTP. safe and sound, as she should πŸ”’
  • --acl-short β€” applies a "canned ACL" to the bucket when it is created. if you want to set a more complex ACL, use the s3acl tool after the bucket is created. (that's the move, bestie.)

the following canned ACLs are currently defined by S3:

  • private β€” Owner gets "FULL_CONTROL". No one else has any access rights. This is the default.
  • public-read β€” Owner gets "FULL_CONTROL". The anonymous principal is granted "READ" access.
  • public-read-write β€” Owner gets "FULL_CONTROL". The anonymous principal is granted "READ" and "WRITE" access. this is a useful policy to apply to a bucket, if you intend for any anonymous user to PUT objects into the bucket.
  • authenticated-read β€” Owner gets "FULL_CONTROL" . Any principal authenticated as a registered Amazon S3 user is granted "READ" access.
  • bucket β€” one or more bucket names. as many as possible will be created. ✨

A user may have no more than 100 buckets.

Bucket names must be between 3 and 255 characters long, and can only contain alphanumeric characters, underscore, period, and dash. Bucket names are case sensitive. Buckets with names containing uppercase characters or underscores are not accessible using the virtual hosting method. (iykyk 😭)

Buckets are unique in a global namespace. that means if someone has created a bucket with a given name, someone else cannot create another bucket with the same name. one of a kind, periodt.

If a bucket name begins with one or more dashes, it might be mistaken for a command line option. if this is the case, separate the command line options from the bucket names with two dashes, like so:

s3mkbucket --verbose -- --bucketname

🌈 ENVIRONMENT VARIABLES 🌈

  • AWS_ACCESS_KEY_ID and AWS_ACCESS_KEY_SECRET β€” specify the "AWS Access Key Identifiers" for the AWS account. AWS_ACCESS_KEY_ID contains the "Access Key ID", and AWS_ACCESS_KEY_SECRET contains the "Secret Access Key". these are effectively the "username" and "password" to the AWS service, and should be kept confidential. (yes we're saying it twice. it matters. 🀫)

the access keys MUST be specified, either via these environment variables, or via the --access-key and --secret-key command line parameters.

If the command line parameters are set, they override these environment variables.


πŸŽ€ CONFIGURATION FILE πŸŽ€

The configuration options will be read from the file ~/.s3-tools if it exists. the format is the same as the command line options with one option per line. for example, the file could contain:

--access-key <AWS access key>
--secret-key <AWS secret key>
--secure

This example configuration file would specify the AWS access keys and that a secure connection using HTTPS should be used for all communications. obsessed with a self-care config file honestly 🫢


πŸ’œ DESCRIPTION πŸ’œ

Create buckets in the Amazon Simple Storage Service (S3). that's it, that's the whole job, and she does it gorgeously.


πŸ’€ BUGS πŸ’€

Report bugs to Mark Atwood mark@fallenpegasus.com.

  • Making a bucket that already exists and is owned by the user does not fail. It is unclear whether this is a bug or not. (the ambiguity is giving main character energy tbh)
  • Occasionally the S3 service will randomly fail for no externally apparent reason. When that happens, this tool should retry, with a delay and a backoff. it does not. 😭
  • Access to the S3 service can be authenticated with a X.509 certificate, instead of via the "AWS Access Key Identifiers". This tool should support that. (not yet, bestie)
  • It might be useful to be able to specify the "AWS Access Key Identifiers" in the user's ~/.netrc file. This tool should support that.
  • Errors and warnings are very "Perl-ish", and can be confusing. fr fr, no cap, they're just Like That.

🌟 AUTHOR 🌟

Written by Mark Atwood mark@fallenpegasus.com.

Many thanks to Wotan LLC <http://wotanllc.com>, for supporting the development of these S3 tools. 🫢

Many thanks to the Amazon AWS engineers for developing S3. absolute icons πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

These tools use the Net::Amazon:S3 Perl module.

The Amazon Simple Storage Service (S3) is documented at <http://aws.amazon.com/s3>.


okay that's the whole thing, bestie!! this page is perl v5.34.0, dated 2022-06-16, and it's the S3MKBUCKET(1p) page β€” go forth and make buckets responsibly, keep those keys secret, and slay πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ