Hi, I'm using the `aws cli` in order to

Hi, I'm using the aws cli in order to sync my folder with the R2 Bucket. But whatever I'm doing I'm facing issues. I've created the R2 Bucket, with EU as the preferred region. I've created an account API token which has read & write access to the specific R2 bucket. When I'm passing the endpoint URL without the bucket name at the ending e.g., https://abcde123456789.eu.r2.cloudflarestorage.com, I'm getting internal error messages from Cloudflare. When appending the bucket name at the end, so https://abcde123456789.eu.r2.cloudflarestorage.com/xyq-bucket, then I'm getting following error message fatal error: An error occurred (NoSuchKey) when calling the ListObjectsV2 operation: The specified key does not exist.. I've already researched so much but am not able to find any solution. Edit: Here is the cmd I'm using aws s3 sync ./packages/design/storybook-static s3://design-system --endpoint-url https://abcde123456789.eu.r2.cloudflarestorage.com/design-system
8 Replies
dr1ftc1oud
dr1ftc1oud8mo ago
Does the xyq-bucket bucket exist?
Sahel
SahelOP8mo ago
@dr1ftc1oud Yes it does. I've just generalized my cases a bit for better understanding. If you need any further details I can provide them.
dr1ftc1oud
dr1ftc1oud8mo ago
"When I'm passing the endpoint URL without the bucket name at the ending e.g., https://abcde123456789.eu.r2.cloudflarestorage.com, I'm getting internal error messages from Cloudflare." - can you let me know what error messages you seeing?
Sahel
SahelOP8mo ago
Here are the logs. I've passed the endpoint without the bucket name at the end. In the logs you will see the requests and responses (+ Response Header and Body)
Sahel
SahelOP8mo ago
There is also a CF-RAY ID 9346910588d54534-TXL Could this help you to investigate more into it? Hi @dr1ftc1oud are there any updates?
dr1ftc1oud
dr1ftc1oud8mo ago
I don't have an update yet. I would need more details to help. Could you link your CF account to discord user using the /link command?
Sahel
SahelOP7mo ago
@dr1ftc1oud done, it's linked now Any updates here?
dr1ftc1oud
dr1ftc1oud7mo ago
Hey @Sahel, sorry for the delay. I'm unable to replicate your issue. I just tried what you suggested and it worked fine. I would suggest checking for a few things: 1. Ensure ./packages/design/storybook-static is correct. Try packages/design/storybook-static instead from the directory where you're running your command. 2. Ensure that storybook-static folder contains files and is not empty. 3. aws s3 sync local-directory/ s3://your-bucket-name/ --endpoint-url https://your-account-id.r2.cloudflarestorage.com : This is the correct format. 4. If it doesn't work still, can you run aws --version and let me know the version of your CLI. Also, happy to help but I am not active here so my responses are delayed. If you are blocked, would suggest resurfacing on the #r2 channel once again.

Did you find this page helpful?