Skip to content

node-s3-cli with Digital Ocean Spaces #39

@gsiotas

Description

@gsiotas

After searching through and following this comment, I managed to make the node-s3-cli work with Digital Ocean Spaces (DO Spaces).
In the config file "~/.s3cfg" just put the default configuration:

[default]
access_key = foo
secret_key = bar

Of course you have to change the foo and the bar according to the data you receive from DO API page.

Then on the file cli.cfg, usually found at:

/usr/local/lib/node_modules/s3-cli

you change the following:

  client = s3.createClient({
    s3Options: {
      accessKeyId: accessKeyId,
      secretAccessKey: secretAccessKey,
      sslEnabled: !args.insecure,
      region: args.region,
endpoint: 'ams3.digitaloceanspaces.com',
    },

Basically you enter the endpoint endpoint: 'ams3.digitaloceanspaces.com', change according to the location of your space.

If I won't hardcore the endpoint I get this error message:

Error: The AWS Access Key Id you provided does not exist in our records.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions