Storj now offers a hosted multitenant gateway (Gateway MT) that is backward compatible with S3. This means you’ll be able to integrate with the Storj network via HTTP, and you won’t have to run anything extra on your end.
Using Gateway MT with AWS CLI is a 2-step process:
Navigate to the Access page within your project and then click on Create Access Grant +. A modal window will pop up and you can enter a name for this access grant.
Assign the permissions you want this access grant to have, then click on Continue in Browser:
Enter the Encryption Passphrase you used for your other access grants. If this isuour first access grant, we strongly encourage you to use a mnemonic phrase as your encryption passphrase. (The GUI automatically generates one on the client-side for you)
Click on the Generate S3 Gateway Credentials link and then click on the 'Generate Credentials' button.
Copy your Access Key, Secret Key, and Endpoint to a safe location.
Now you are ready to configure AWS CLI.
Verify your AWS CLI version by running
aws --versionin your terminal. AWS CLI current version is version 2. If you are using AWS CLI v1, you will need to install a plugin to be able to define the endpoint. See how here.
2. Configure your AWS CLI with the gateway MT credentials from the previous step by running
aws configure in your terminal:
~ % aws configureAWS Access Key ID [****************e53q]: <<yourAccessKey>>AWS Secret Access Key [****************bbxq]: <<yourSecretKey>>Default region name [us-east-1]:Default output format [None]:~ %
3. Optional but strongly recommended: Set the multipart threshold to 64 MB.
You can now use AWS CLI. Some examples of use:
~ % aws --endpoint-url=https://gateway.eu1.storjshare.io s3 mb s3://waterbear
aws --endpoint-url=https://gateway.eu1.storjshare.io s3 ls
aws --endpoint-url=https://gateway.eu1.storjshare.io s3 cp /tmp/test.zip s3://waterbear
aws --endpoint-url=https://gateway.eu1.storjshare.io s3 ls s3://waterbear --endpoint-url=https://gateway.storj.io
aws --endpoint-url=https://gateway.eu1.storjshare.io s3 cp s3://waterbear/test.zip /tmp/Archive.zip