# Cannot upload file with aws-cli

**URL:** <https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374>\
**Category:** troubleshooting\
**Tags:** aws-cli\
**Created:** [February 26, 2025, 4:03pm UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374 "2025-02-26T16:03:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tushar-saxena-yral](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tushar-saxena-yral/32/1121_2.png) [@tushar-saxena-yral](https://forum.storj.io/u/tushar-saxena-yral)\
**Post date:** [February 26, 2025, 4:03pm UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/1 "2025-02-26T16:03:29Z")

</div>

I am unable to upload files to storj with neither gateway-mt nor gateway-st using aws-cli. I have two instances of gateway-st running, 1. locally, 2. remotely on fly. They are all backed by the same account.

However, I can upload using the `uplink` cli. Moreover, I can not upload using aws’ rust sdk with a different error, so i will open a separate issue later.

 ![image](https://storj-s3.bcdn.literatehosting.net/original/3X/d/1/d1f7e22aec6a092e764559af3483d18d5962b066.png)

---

<div class="post-metadata">

**Author:** ![tushar-saxena-yral](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tushar-saxena-yral/32/1121_2.png) [@tushar-saxena-yral](https://forum.storj.io/u/tushar-saxena-yral)\
**Post date:** [February 26, 2025, 4:14pm UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/2 "2025-02-26T16:14:58Z")

</div>

Not sure if this is relevant but the gateway running locally and on fly returns 503 when i try to get clusters’ health:

 ![image](https://storj-s3.bcdn.literatehosting.net/original/3X/9/a/9a6c047a7720bf4c630076bf7dd7fb1f5295fb8c.png)

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 27, 2025, 1:43am UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/3 "2025-02-27T01:43:26Z")

</div>

Could you please try to open [http://localhost:7777](http://localhost:7777) in your browser?  
Perhaps you need to allow this port in the firewall.

Also, for aws CLI please add an endpoint `--endpoint http://localhost:7777` to the commands, because it would work from a profile only if you setup an endpoint plugin: [Setting Up AWS CLI Endpoint to Storj - Storj Docs](https://storj.dev/dcs/code/aws/aws-cli-endpoint).

It’s not a cluster instance, it’s a single node, so you will always get 503:  
[https://min.io/docs/minio/linux/operations/monitoring/healthcheck-probe.html#id3](https://min.io/docs/minio/linux/operations/monitoring/healthcheck-probe.html#id3)

> A response code of `200 OK` indicates that the MinIO cluster has sufficient MinIO servers online to meet read quorum. A response code of `503 Service Unavailable` indicates the cluster does not currently have read quorum.

You need to use a [Node Liveness healthcheck](https://min.io/docs/minio/linux/operations/monitoring/healthcheck-probe.html#id1) instead.

---

<div class="post-metadata">

**Author:** ![tushar-saxena-yral](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tushar-saxena-yral/32/1121_2.png) [@tushar-saxena-yral](https://forum.storj.io/u/tushar-saxena-yral)\
**Post date:** [February 27, 2025, 5:31am UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/4 "2025-02-27T05:31:57Z")

</div>

I wanna repeat that i am using three different instances for testing:

- local
- fly hosted
- and one provided by storj

And in the screenshot you can see that `aws s3 ls` works for all three of them. The issue we are trying to resolve is the fact that the server returns `You must provide the Content-Length HTTP Header` when using `aws s3 cp`

---

<div class="post-metadata">

**Author:** ![heunland](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/heunland/32/6076_2.png) [@heunland](https://forum.storj.io/u/heunland)\
**Post date:** [February 27, 2025, 3:26pm UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/5 "2025-02-27T15:26:08Z")

</div>

Please indicate if you are using boto3 version \>= 1.36.0

---

<div class="post-metadata">

**Author:** ![tushar-saxena-yral](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tushar-saxena-yral/32/1121_2.png) [@tushar-saxena-yral](https://forum.storj.io/u/tushar-saxena-yral)\
**Post date:** [February 27, 2025, 3:50pm UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/6 "2025-02-27T15:50:11Z")

</div>

I am using aws cli. which internally uses botocore/1.36.23.

```auto
aws-cli/1.37.23 Python/3.13.2 Linux/6.13.4-arch1-1 botocore/1.36.23

```

---

<div class="post-metadata">

**Author:** ![heunland](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/heunland/32/6076_2.png) [@heunland](https://forum.storj.io/u/heunland)\
**Post date:** [February 27, 2025, 4:03pm UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/7 "2025-02-27T16:03:38Z")

</div>

Please downgraded to v1.35.99 for now. You can find the explanation of this breaking change in boto3 in this [github issue](https://github.com/boto/boto3/issues/4392).

Specifically, please note

> Disclaimer: The AWS SDKs and CLI are designed for usage with official AWS services. We may introduce and enable new features by default, such as these new default integrity protections prior to them being supported or handled by third-party service implementations. You can disable the new behavior with the WHEN\_REQUIRED value for the request\_checksum\_calculation and response\_checksum\_validation configuration options covered in Data Integrity Protections for Amazon S3.

It is preferable to downgrade rather than disabling the new behavior with WHEN\_REQUIRED, and this may not even work with Storj anyway.

---

<div class="post-metadata">

**Author:** ![tushar-saxena-yral](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tushar-saxena-yral/32/1121_2.png) [@tushar-saxena-yral](https://forum.storj.io/u/tushar-saxena-yral)\
**Post date:** [February 27, 2025, 4:09pm UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/8 "2025-02-27T16:09:51Z")

</div>

Does storj have tracking issue for implementing the new integrity checks?

---

<div class="post-metadata">

**Author:** ![heunland](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/heunland/32/6076_2.png) [@heunland](https://forum.storj.io/u/heunland)\
**Post date:** [February 27, 2025, 4:20pm UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/9 "2025-02-27T16:20:32Z")

</div>

you can follow [AWS CLI uses streaming trailer chunked requests on newer versions · Issue #89 · storj/gateway-st · GitHub](https://github.com/storj/gateway-st/issues/89)

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 28, 2025, 3:18am UTC](https://forum.storj.io/t/cannot-upload-file-with-aws-cli/29374/10 "2025-02-28T03:18:08Z")

</div>

> <https://github.com/storj/docs/pull/477>
