Skip to content

Workaround for s3cmd showing ETag as MD5 sum

Issue

There is a known issue with the command line application s3cmd, where s3cmd information incorrectly shows ETag as an MD5 sum.

In some cases, the MD5 and ETag will be the same value, but in the case of multi-part objects the value will be different.

See also: https://github.com/s3tools/s3cmd/issues/1336.

Workaround

To view the ETag of an object, you'll need to use the AWS CLI instead of s3cmd.

For example:

Bash
- aws s3api head-object --bucket <bucketName> --key <objectName> --query ETag --output text

or, list all objects and relevant information in a bucket:

Bash
- aws s3api list-objects --bucket <bucketName>

Note that in the above example, the key value is object-name.

To set up AWS CLI, you'll need to configure the config and credentials files with the following updates:

~/.aws/config

Bash
[default]
endpoint_url = https://object.us-east-1.rumble.cloud
region = local

~/.aws/credentials

Bash
[default]
aws_access_key_id = <accessKey>
aws_secret_access_key = <secretKey>

After these two files are updated, the tool will work for S3 api specific subcommands.