Back to articles
MinIO Has a Free S3-Compatible API You Can Self-Host Anywhere
How-ToDevOps

MinIO Has a Free S3-Compatible API You Can Self-Host Anywhere

via Dev.to DevOpsAlex Spinov

MinIO is an S3-compatible object storage server you can run anywhere — laptop, server, or Kubernetes. Same AWS S3 API, zero cloud cost. Setup docker run -p 9000:9000 -p 9001:9001 \ -e MINIO_ROOT_USER = admin \ -e MINIO_ROOT_PASSWORD = password123 \ minio/minio server /data --console-address ":9001" Use with AWS SDK import { S3Client , PutObjectCommand , GetObjectCommand , ListObjectsV2Command } from ' @aws-sdk/client-s3 ' ; const s3 = new S3Client ({ endpoint : ' http://localhost:9000 ' , region : ' us-east-1 ' , credentials : { accessKeyId : ' admin ' , secretAccessKey : ' password123 ' }, forcePathStyle : true }); // Upload await s3 . send ( new PutObjectCommand ({ Bucket : ' my-bucket ' , Key : ' photos/cat.jpg ' , Body : fileBuffer , ContentType : ' image/jpeg ' })); // Download const { Body } = await s3 . send ( new GetObjectCommand ({ Bucket : ' my-bucket ' , Key : ' photos/cat.jpg ' })); // List objects const { Contents } = await s3 . send ( new ListObjectsV2Command ({ Bucket :

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
7 views

Related Articles