website logo
Create accountLogin
Home
DCS
Node
Resources
Help center
Navigate through spaces
Home
DCS
Node
Resources
Help center
⌘K
Storj DCS
Get Started
AWS CLI and Hosted Gateway MT
AWS SDK and Hosted Gateway MT
Uplink CLI
Satellite Admin Console
Object Browser
Downloads
Download Uplink CLI
Download Self-hosted S3 Compatible Gateway
Download Storj Client Libraries
SDKs & Reference
Tutorial
How-to Guides
Concepts
Support
Support Overview
FAQ
Community Forum
Status Page
Help Desk
Billing, Payment & Accounts
Resources
Moved Documents
Docs powered by archbee 
10min

Using presigned URLs

Introduction

Creating presigned URLs for Storj DCS - HTTP POST & GET to a URL

All objects and paths are private and encrypted by default. However, it is possible to use a pre-signed URL via our S3-compatible gateway to enable unauthenticated customers/users to upload objects to buckets or access objects in buckets without providing an Access Grants or AWS SDK and Hosted Gateway MT.

HTTP GET vs Storj Linkshare Service

While we support this behavior via the S3-compatible pre-signed URL function, as an alternative to sharing with a customer/user via a GET, consider utilizing our Linksharing Service. One advantage of this approach is the ability to easily create perpetual share links, valid until you remove them or until a configurable end date of any duration. You can even Host a Static Website via Linkshare.

Tutorial

The goal of the following tutorial is to guide you in the creation of pre-signed URLs for storage DCS using a Python script and our multi-tenant hosted gateway.

Our lab example took place on MacOSX and used BREW as a package manager. Depending on your host operating system, you will need to use the appropriate package manager to fetch the prerequisites listed below.

Our implementation of the S3 standard allows additional configuration options. Please reference the official AWS S3 User Guide for additional details.

Prerequisites

Terminal
|


Script

Create your script my_put_script.py

This script will create a “put” pre-signed URL to be used for uploading

Below you can see we need to set the following parameters:

  • ACCESS_KEY - S3 Credential created with Access
  • SECRET_KEY - S3 Credential created with Access
  • URL - You can use us1, eu1, or ap1 depending on location
  • BUCKET NAME - Name of the bucket related to this URL
  • url - Use ‘put_object to upload and ‘get_object’ to download/share
  • Key - Path of the object you wish to upload
  • ExpiresIn - How long the URL will be valid from its creation (in seconds)
Python
|


Execute script myscript.py

The output of this script will be your pre-signed URL

Terminal
|


Upload with URL and Curl

Set for file name and extension and paste in your newly generated pre-signed URL. Note that the pre-signed URL below is invalid and included as an example only.

Terminal
|




Updated 03 Mar 2023
Did this page help you?
Yes
No
UP NEXT
Supported S3 Commands
Docs powered by archbee 
TABLE OF CONTENTS
Introduction
HTTP GET vs Storj Linkshare Service
Tutorial
Prerequisites
Script
Create your script my_put_script.py
Execute script myscript.py
Upload with URL and Curl