我想制作一个 python S3 客户端来将数据存储在 appcloud 提供的 S3 动态存储服务中。所以我发现了适用于 python 的 boto3 SDK,并且想知道这个东西在 appcloud 上是如何工作的。您在本地安装 aws cli 来配置您的凭据,但您如何在云上执行此操作?是否有人有为内部 appcloud 创建 S3 python 客户端的经验,可以为我提供一个简短的示例(boto3 或不同的方法)?
问候
编辑1:
试过这个:
import boto3
s3 = boto3.client('s3', endpoint_url='https://ds31s3.swisscom.com/', aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET)
s3.create_bucket(Bucket="sc-testbucket1234")
但我得到了这个例外:
botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://ds31s3.swisscom.com"