0

I'm following the documentation to connect to object storage with boto3 here: https://www.linode.com/docs/products/storage/object-storage/guides/aws-sdk-for-python/

Here is my code


linode_obj_config = {
    "aws_access_key_id": "1S**J",
    "aws_secret_access_key": "YJ**25gjqS3",
    "endpoint_url": "us-southeast-1.linodeobjects.com",
}

client = boto3.client("s3", **linode_obj_config) response = client.list_objects(Bucket='my_bucket') for object in response['Contents']: print(object['Key'])

Here is the error:

  File "/home/bb/.local/lib/python3.8/site-packages/botocore/endpoint.py", line 402, in create_endpoint
    raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: us-southeast-1.linodeobjects.com

I have tried different variations of the endpoint with http:// and https://, and putting the bucket name in the url, but nothing seems to work. Why can't boto3 recognize the object storage endpoint?

0 Answers0