S3 API NEO Object Storage

Written By Support Team (Administrator)

Updated at February 14th, 2021

NEO Object Storage provides the S3 Native API. In it, all functions are active by default but can be disabled, making it easier for you to access NEO Object Storage from a Compatible EndPoint.

There are several important points in NEO Object Storage, namely:

  • S3 Endpoint

An endpoint that can be used to manage your NEO Object Storage. Here you can add, delete, or edit your data. You must log in using this endpoint to be able to access the NEO Object Storage service now.

 

  • S3 Website Endpoints

An Endpoint that you can use if you want to access content without logging in. Your data is in the form of an URL that can be accessed from anywhere.

 

Here are several methods for managing NEO Object Storage using the S3 Client: 

  • S3cmd

http://s3tools.org/s3cmd

 

S3cmd is a command line tool for clients that can be used to upload, receive, and manage data on your NEO Object Storage using the S3 Protocol. For S3cmd configuration, you can change the parameters in ~/.s3cfg, or use the "S3cmd –configure" command. For example, as shown below:

 

[default]

access_key = <your_access_key>

host_base = nos.wjv-1.neo.id

host_bucket = <your_bucket_name>.nos.wjv-1.neo.id

secret_key = <your_secret_key>

 

By default, S3cmd uses the https protocol, but you can change it using the following parameters:

 

$ s3cmd ls

2009-02-03 16:45 s3://somebucket

$ s3cmd ls s3://somebucket

 

S3CMD Command Reference: http://s3tools.org/usage

 

  • AWS-CLI

AWS-CLI is the official Amazon CLI for AWS, with the AWS-CLI-endpoint-plugin it is very easy to configure endpoints with multiple profiles. To start configuring the AWS-CLI, you can edit the ~/.aws/config file. Here is an example of a configuration you can do:

 


With the configuration, you can use AWS-CLI.

 

$ aws s3 mb s3://test-bucket

make_bucket: test-bucket

$aws s3 ls

2009-02-03 08:45:09 test-bucket

$ aws s3 cp file.txt s3://test-bucket/obj.txt

upload: ./file.txt to s3://test-bucket/obj.txt

$ aws s3 ls s3://test-bucket

2017-07-27 11:29:29         28 obj.txt

 

AWS CLI Command Reference: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html

Was this article helpful?