スキップしてコンテンツを表示

Streaming a zip folder to S3 from Lambda

0

Hi. I've got an automation set up that backs up our Jira instance and uploads it to an S3 bucket. I recently changed the credentials used by the automation and it stopped working. I tried to fix it and even went back to the old credentials but get this error when trying to upload to S3: error: An HTTP Client raised an unhandled exception: sequence item 0: expected str instance, bytes found The error coming from : s3_client.upload_fileobj(backup_data, bucket_name, 'backups/' + s3_object_key). The code works fine locally but not on the Lambda.

Additionally, I once had this same issue, but had no fix for it. after a few days the error didn't come up. I can upload a json file to S3 via the Lambda function but this Zip folder. I've been going around in circles to try and fix this. I've attempted to update the layer as well to include the latest version of packages. Any help on this is greatly appreciated.

質問済み 2年前453ビュー
1回答
3
承認された回答

Hi,

See https://github.com/boto/botocore/issues/3111#issuecomment-1944524714

Read all details: your problem seems to come from urllib3 that has to be pinned to a back version to avoid the issue.

Based on this, you will have to downgrade some components.

Best,

Didier

エキスパート
回答済み 2年前
エキスパート
レビュー済み 2年前

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

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

関連するコンテンツ