By Stefan
In the Digital Ocean API reference I see information on creating a CDN endpoint, but not for actually creating a Space (Object Storage Solution). Is this the same thing? If not, can someone point me to the correct documentation? Thanks!
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!
Accepted Answer
I think you are better of using the Amazon S3 SDK https://docs.digitalocean.com/products/spaces/resources/s3-sdk-examples/ .
They do show at https://docs.digitalocean.com/reference/api/spaces-api/ how a bucket using a put request winds up being:
PUT / HTTP/1.1
Host: static-images.nyc3.digitaloceanspaces.com
x-amz-acl: public-read
x-amz-content-sha256: c6f1fc479f5f690c443b73a258aacc06ddad09eca0b001e9640ff2cd56fe5710
x-amz-date: 20170710T173143Z
Authorization: AWS4-HMAC-SHA256 Credential=II5JDQBAN3JYM4DNEB6C/20170710/nyc3/s3/aws4_request,SignedHeaders=host;x-amz-acl;x-amz-content-sha256;x-amz-date,Signature=6cab03bef74a80a0441ab7fd33c829a2cdb46bba07e82da518cdb78ac238fda5
<CreateBucketConfiguration>
<LocationConstraint>nyc3</LocationConstraint>
</CreateBucketConfiguration>
but they do not show/have doctl
commands for spaces https://docs.digitalocean.com/reference/doctl/reference/
Seems as Spaces is compatible with S3 you should use their SDK for Spaces.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.