S3PUT(1p)
πΎ S3PUT(1p) β the write-an-S3-item era πΎ
okay bestie, so this is s3put, a User Contributed Perl Documentation situation, living in section 1p of the manual. she's a lil script that reads your stdin and yeets it up into an S3 item. that's the whole vibe. let's get into it π«Ά
β¨ NAME β¨
s3put β Write an S3 item
like. that's it. that's the girl. she writes an S3 item. π
πΈ SYNOPSIS πΈ
s3put [options] [ bucket/item ...]
Options:
--access-key AWS Access Key ID
--secret-key AWS Secret Access Key
Environment:
AWS_ACCESS_KEY_ID
AWS_ACCESS_KEY_SECRET
so you run her with whatever options, and then optionally a bucket/item or a few of them, and she does her thing. the options and the environment variables are your two ways of telling her who you are. more on that below, stay with me π§
π OPTIONS π
--helpβ prints a short lil help message and then dips. exits immediately. bye! π--manβ prints the whole manual page and exits. that's the long version, the one you're reading rn, iconic behavior fr.--verboseβ tells you what's happening as it's happening. output as she goes, no mystery, we love transparency.--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". lowkey think of them as the username and password for your AWS account, except they're the kind of username and password you should keep confidential, like, do not be posting these, bestie π
The access keys MUST be specified, either via these command line parameters, or via theAWS_ACCESS_KEY_IDandAWS_ACCESS_KEY_SECRETenvironment variables. no keys, no service. that's the rule.
Specifying them on the command line overrides the environment variables. command line stays winning, periodt.
--secureβ uses SSL/TLS HTTPS to communicate with the AWS service instead of HTTP. she's putting on the little padlock ππ
π 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. literally treat them like your diary, except worse if someone finds them π
The access keys MUST be specified, either via these environment variables, or via the--access-keyand--secret-keycommand line parameters. those are the only two doors, pick one.
If the command line parameters are set, they override these environment variables. so if both exist, cmdline wins, no debate, iykyk.
π CONFIGURATION FILE π
okay so here's the tea β the configuration options get read from the file ~/.s3-tools, if it exists. if it doesn't exist, whatever, she just moves on, no drama. π
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. so it's like a lil pre-set vibe for every single run. obsessed. β¨
π DESCRIPTION π
Reads stdin, and writes it to an S3 item.
that's the entire plot. she takes what you pipe into her and she puts it in S3. main character energy tbh π
π BUGS π
Report bugs to Mark Atwood mark@fallenpegasus.com. he wants to know, bestie, tell him.
and now the list of things that are lowkey cursed, in the original's own words:
- 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. (emphasis on should β as in, that's a known gap, not a feature. no cap π)
- 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. (again: should. doesn't. yet.)
- It might be useful to be able to specify the "AWS Access Key Identifiers" in the user's
~/.netrcfile. This tool should support that. (you see the pattern here π« ) - Errors and warnings are very "Perl-ish", and can be confusing. (translating: good luck decoding those messages, they're giving cryptic π)
- Trying to write to a bucket that does not exist or is not accessible by the user generates less than helpful error messages. (so you'll be sitting there like ??? π)
- Trying to put a bucket instead of an item is silently skipped. (no error, no warning, just nothing. ghosted. π»)
π₯ TODO π₯
the wishlist, the vision board, the "one day" list:
option to read from files instead of stdin
use the fs mtime to set the http Last-Modified
option to read filenames to read from, from stdin
option to read from a tar file stream, for multiple items
option to magically guess mime type
option to use extended file attributes for metadata
option to have a progress bar
a progress bar?? the girlies are asking. the people want the progress bar. π
π 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, respect where respect is due. β
π¦ SEE ALSO π¦
- These tools use the
Net::Amazon:S3Perl module. - The Amazon Simple Storage Service (S3) is documented at <http://aws.amazon.com/s3>.
and that's the whole page bestie!! π this lil gem comes from perl v5.34.0, dated 2022-06-16, filed under S3PUT(1p) in the User Contributed Perl Documentation section. go forth and put some things in S3, and keep those keys confidential, fr fr πΈβ¨π
π¦ 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