S3MKBUCKET(1p)
π 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-keyand--secret-keyβ these specify the "AWS Access Key Identifiers" for the AWS account.--access-keyis the "Access Key ID", and--secret-keyis 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 thes3acltool 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_IDandAWS_ACCESS_KEY_SECRETβ specify the "AWS Access Key Identifiers" for the AWS account.AWS_ACCESS_KEY_IDcontains the "Access Key ID", andAWS_ACCESS_KEY_SECRETcontains 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
~/.netrcfile. 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 πβ¨ππ¦πΈ
π¦ where this page comes from
- debian bookworm: libnet-amazon-s3-tools-perl 0.08-3 Β· LGPL-2.1-or-later
- debian trixie: libnet-amazon-s3-tools-perl 0.08-3 Β· LGPL-2.1-or-later
- ubuntu noble: libnet-amazon-s3-tools-perl 0.08-3 Β· LGPL-2.1-or-later
- ubuntu resolute: libnet-amazon-s3-tools-perl 0.08-3 Β· LGPL-2.1-or-later
- ubuntu stonking: libnet-amazon-s3-tools-perl 0.08-3 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms