localstack / localstack/localstack-python-client

when using S3fs with localstack error is thrown about keys

未關閉
#51 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
191
分支
31
PR 合併指標
30 天內沒有已合併 PR

描述

using enable_local_endpoints()

the following error is thrown when uploading to s3 with pandas and S3FS

024-03-06 11:28:48.862 | ERROR    | tests.integration.test_pipelines:test_analytics:124 - An error has been caught in function 'test_analytics', process 'MainProcess' (9286), thread 'MainThread' (7997807680):
Traceback (most recent call last):

  File "/Users/johnharrison/git/database_flattening/venv/lib/python3.10/site-packages/s3fs/core.py", line 113, in _error_wrapper
    return await func(*args, **kwargs)
                 │     │       └ {'Key': 'main/monitoring/analytics/mongo_query_date=2024-03-05 00:00:00/2024-03-05 00:00:00.csv', 'Bucket': 'ds-spectrum-tabl...
                 │     └ ()
                 └ <bound method ClientCreator._create_api_method.<locals>._api_call of <aiobotocore.client.S3 object at 0x14fe17280>>
  File "/Users/johnharrison/git/database_flattening/venv/lib/python3.10/site-packages/aiobotocore/client.py", line 408, in _make_api_call
    raise error_class(parsed_response, operation_name)
          │           │                └ 'PutObject'
          │           └ {'Error': {'Code': 'InvalidAccessKeyId', 'Message': 'The AWS Access Key Id you provided does not exist in our records.', 'AWS...
          └ <class 'botocore.exceptions.ClientError'>

botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records.


The above exception was the direct cause of the following exception:

sample code to test this

isna__sum.to_csv( f's3://tables/main/monitoring/analytics/{start_date}.csv')

error seems to be coming from aiobotocore

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,使用 LocalStack S3 設定和 aiobotocore 的 InvalidAccessKeyId traceback 作為切入點,重現呼叫 enable_local_endpoints() 後回報的 pandas to_csv 上傳問題。未指定專案檔案或測試;完成的標準是上傳至 LocalStack 成功,且不出現憑證錯誤。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
aws, pandas, python
領域
cloud
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。