Drop-in S3-compatible object storage. Works with the AWS
SDK,
boto3, and any tool that speaks S3. Same region
as your database.
Your bucket, endpoint, and keys are provisioned
alongside your database. Copy the vars below into
your .env or use one of the SDK
snippets.
STORAGE_ENDPOINT=https://project_id.storage.nyas.io/v1/s3 STORAGE_REGION=ap-south-1 STORAGE_BUCKET=my-bucket ACCESS_KEY=019dc51f673a77b09c204ef4453b6abc SECRET_KEY=LK6BNCAwVevu6YHTSp6rCNvCp0yFIiTjgPUbgdYs
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3' const s3 = new S3Client({ endpoint: process.env.STORAGE_ENDPOINT, region: process.env.STORAGE_REGION, credentials: { accessKeyId: process.env.ACCESS_KEY, secretAccessKey: process.env.SECRET_KEY, }, forcePathStyle: true, })
import boto3, os s3 = boto3.client( "s3", endpoint_url=os.environ["STORAGE_ENDPOINT"], region_name=os.environ["STORAGE_REGION"], aws_access_key_id=os.environ["ACCESS_KEY"], aws_secret_access_key=os.environ["SECRET_KEY"], )
curl -LsSf
https://app.nyas.io/install.sh |
sh
nyas store project_id
forcePathStyle: true)