s3cmd is a free, feature-rich, command-line tool for managing Amazon S3 and other S3-compatible cloud storage services. Written in Python, it allows users to upload, retrieve, and manage data with simple shell commands. The current version is 2.4.0, and it follows an active maintenance release cadence.
pip install s3cmdVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to interact with the s3cmd command-line tool from a Python script using the `subprocess` module to list S3 buckets. Users must ensure s3cmd is installed and configured with appropriate AWS credentials (e.g., via `s3cmd --configure` or environment variables).
Review your `~/.s3cfg` file and remove or set `signature_v2 = False`. Ensure your AWS region supports SigV4 (most modern regions do). Re-run `s3cmd --configure` to generate a new, compliant configuration if needed.
Run `s3cmd --configure` to create or update your `~/.s3cfg` file, providing your AWS Access Key, Secret Key, and optionally a default region. Ensure the file has appropriate permissions (e.g., `chmod 600 ~/.s3cfg`).
To upload objects without SSE-S3 encryption, use the `--no-encryption` option. For other encryption types (e.g., SSE-C, SSE-KMS), refer to the s3cmd documentation for specific options like `--sse` or `--encrypt`.
Always double-check your `s3cmd del` or `s3cmd rm` commands before adding `--force`. Consider using the `--dry-run` option first to preview the operations that would be performed without actually executing them.
Use the `--host` and `--host-bucket` options to point to the specific endpoint of your S3-compatible service. For example, `--host=sgp1.digitaloceanspaces.com --host-bucket=%(bucket)s.sgp1.digitaloceanspaces.com` for DigitalOcean Spaces.
No dependency data recorded yet.