Curl error on CSVs- Exception on close of streams: AwsS3Client exception: Access Denied

#1

Hello,

I am trying to curl a CSV file to C3, the canonical seems to be in place, but the exception I am getting is as below -

<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /import/1/tenant/tag/CanonicalName/fileName.csv. Reason:
<pre>    c3.love.exceptions.C3RuntimeException: Exception on close of streams: AwsS3Client exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: DB955D908F0D68B2; S3 Extended Request ID: UY46dx0RCNRLUatvAx/mwuzZVZK2mWPmwx8F4LlKF5l56V2JQwovksJUH0g1U2g1fZUKLLzEHBM=)
errorCode=&quot;AccessDenied&quot;; errorType=&quot;Client&quot;; requestId=&quot;DB955D908F0D68B2&quot;; serviceName=&quot;Amazon S3&quot;; httpStatusCode=&quot;403&quot;
</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>

Although, I am able to curl JSON files without any error, they’re getting uploaded and processed successfully.

Has there been any specific restrictions placed on CSVs?

Here’s my curl command anyway -
curl --data-binary @FileName.csv https://.c3iot.com/import/1/tenant/tag/CanonicalName/FileName.csv --header “Content-Type: text/csv” --header “Authorization:” --proxy --request PUT -v

Thank you for reading.
Appreciate any help

0 Likes

#2

I got the same issue while I was working on one of my CSV files.

@venkatallagadda suggested me to try deleting the file you are trying to curl in the S3 bucket and retry to curl it again.

It worked for me.

0 Likes