Unable to upload to s3 using pre_signed_url generated using IAM roles

0

I use the below code to generate a pre_signed_url to upload multiple files using a single url.

response = s3_client.generate_presigned_post(
            bucket_name,
            "${filename}",
            Fields=fields,
            Conditions=[["starts-with", "$key", ""]],
            ExpiresIn=expiration,
        )

I tested it out locally and it works but the url genrated in the ecs service that is deployed is throughing the following error requests.exceptions.SSLError: HTTPSConnectionPool(host='<bucket_name>.s3.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2423)')))

How to resole the issue i am facing , i looked into it and this github issue but we are not using ACL , can anyone help me with this

2回答
0
承認された回答

I have found the solution for the above issue,It was because of the another parameter x-amz-security-token that was not considered because of the response schema defined.

回答済み 5ヶ月前
0

The eror says an EOF (End of File) during an SSL handshake, might be related to the SSL/TLS communication when generating a pre-signed URL for S3 upload. Please check that you are using the correct S3 bucket name and AWS region when generating the pre-signed URL. Also check that the region and bucket specified in the code match the actual S3 bucket and region.

profile picture
回答済み 5ヶ月前
  • the bucket name is correct and i am not specifing the region name, is it required to specify the region name?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ