Report this

What is the reason for this report?

Sample code to use boto (not boto3) with Spaces

Posted on October 25, 2017

I’m hoping for sample code using boto (not boto3) for writing an object to the Spaces system and then reading it back.

This StackOverflow question 1 suggested one approach to get started, but the following code produces the result None:

    import boto
    s3 = boto.s3.S3RegionInfo(name='nyc3', 
                              endpoint='https://nyc3.digitaloceanspaces.com',
                              aws_access_key_id=XXXX,
                              aws_secret_access_key=XXXX).connect()
    print s3

I haven’t been able to find anything else potentially relevant.

(Why do I want to use boto instead of boto3? Answer: I have boto3 code working perfectly in my test system, but it fails in what seems to be unpredictable ways when operating at scale, and the fail seems to be inside boto3. If I can get the code working in boto, it is not only a workaround, but would suggest there is a boto3 problem.)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.