I am trying to automated some of my task related to digialocean spaces. but stuck at when i a trying to upload an object to spaces. and i also want to know is there any way to set expiration tag on the object.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
To answer the second question first, Spaces does not currently support “lifecycle” events. So unfortunately you can not use expiration tags at this time.
For the question in the title, uploading an object to Spaces using boto3 requires that you edit the
endpoint
setting for the session. Here’s a quick example:Check this out simple script to help manage your spaces and droplets in python https://github.com/Mashoud123/digitalocean-python-manager