How to use AWS CLI with Digital Ocean Spaces?

Question:

How to use AWS CLI with Digital Ocean Spaces? Is it possible?

I tried to add my key id and secret to .aws/credentials but I got:

An error occurred (InvalidAccessKeyId) when calling the ListBuckets
operation: The AWS Access Key Id you provided does not exist in our
record

Answer:

In order to use the AWS CLI with object storage service that provide an S3-compatible API like DigitalOcean Spaces, you must also configure a custom endpoint.

This can be done on the command line using the --endpoint flag:

Leave a Reply