> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nami.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# S3-Compatible Storage

> Seamless migration from traditional cloud storage to decentralized infrastructure

<Note>
  Nami Cloud's S3-compatible API allows you to migrate from AWS S3 or other cloud providers with zero code changes, bringing Web2 familiarity to Web3 infrastructure.
</Note>

## Why S3 Compatibility Matters

One of the biggest hurdles for organizations moving from Web2 to Web3 has been compatibility. Nami Cloud eliminates this barrier with a **fully S3-compatible API**, allowing you to plug into decentralized storage using the same tools and workflows you use with traditional cloud providers.

### Benefits of S3 Compatibility

* **Zero Learning Curve**: Use familiar AWS SDKs, CLI commands, and third-party tools
* **Instant Migration**: Move from AWS S3 with just endpoint configuration changes
* **No Code Rewrites**: Existing applications work without modification
* **Industry Standard**: Leverage the most widely adopted object storage API

## Supported S3 Operations

Nami Storage supports all standard S3 operations out-of-the-box:

### Bucket Operations

<CardGroup cols={2}>
  <Card title="Create Bucket" icon="plus">
    `PUT /{bucket}`
  </Card>

  <Card title="Delete Bucket" icon="trash">
    `DELETE /{bucket}`
  </Card>

  <Card title="List Buckets" icon="list">
    `GET /`
  </Card>

  <Card title="Bucket Location" icon="location-dot">
    `GET /{bucket}?location`
  </Card>
</CardGroup>

### Object Operations

<CardGroup cols={2}>
  <Card title="Put Object" icon="upload">
    `PUT /{bucket}/{key}`
  </Card>

  <Card title="Get Object" icon="download">
    `GET /{bucket}/{key}`
  </Card>

  <Card title="Delete Object" icon="trash">
    `DELETE /{bucket}/{key}`
  </Card>

  <Card title="List Objects" icon="list">
    `GET /{bucket}`
  </Card>

  <Card title="Head Object" icon="info">
    `HEAD /{bucket}/{key}`
  </Card>

  <Card title="Copy Object" icon="copy">
    `PUT /{bucket}/{key}` with copy headers
  </Card>
</CardGroup>

## Migration Guide

### From AWS S3

Migrating from AWS S3 is as simple as changing your endpoint configuration:

<CodeGroup>
  ```javascript AWS SDK v3 theme={null}
  import { S3Client } from "@aws-sdk/client-s3";

  const s3Client = new S3Client({
    region: "us-east-1",
    endpoint: "https://your-bucket.storage.nami.cloud",
    credentials: {
      accessKeyId: "your-access-key",
      secretAccessKey: "your-secret-key"
    },
    forcePathStyle: false
  });
  ```

  ```python Boto3 theme={null}
  import boto3

  s3_client = boto3.client(
      's3',
      endpoint_url='https://your-bucket.storage.nami.cloud',
      aws_access_key_id='your-access-key',
      aws_secret_access_key='your-secret-key',
      region_name='us-east-1'
  )
  ```

  ```bash AWS CLI theme={null}
  aws configure set aws_access_key_id your-access-key
  aws configure set aws_secret_access_key your-secret-key
  aws configure set default.region us-east-1

  # Use with custom endpoint
  aws s3 ls --endpoint-url https://your-bucket.storage.nami.cloud
  ```

  ```go Go SDK theme={null}
  import (
      "github.com/aws/aws-sdk-go/aws"
      "github.com/aws/aws-sdk-go/aws/credentials"
      "github.com/aws/aws-sdk-go/aws/session"
      "github.com/aws/aws-sdk-go/service/s3"
  )

  sess := session.Must(session.NewSession(&aws.Config{
      Region:           aws.String("us-east-1"),
      Endpoint:         aws.String("https://your-bucket.storage.nami.cloud"),
      Credentials:      credentials.NewStaticCredentials("access-key", "secret-key", ""),
      S3ForcePathStyle: aws.Bool(false),
  }))

  s3Client := s3.New(sess)
  ```
</CodeGroup>

### Migration Checklist

<Steps>
  <Step title="Update Endpoint">
    Change your S3 endpoint to `https://{bucket}.storage.nami.cloud`
  </Step>

  <Step title="Update Credentials">
    Replace AWS credentials with your Nami Cloud access keys
  </Step>

  <Step title="Test Operations">
    Verify basic operations like list, upload, and download work
  </Step>

  <Step title="Update Production">
    Deploy the endpoint changes to your production environment
  </Step>
</Steps>

## Key Differences from AWS S3

While Nami Storage is fully S3-compatible, there are some enhancements specific to decentralized storage:

### Enhanced Features

| Feature                   | AWS S3              | Nami Storage                           |
| ------------------------- | ------------------- | -------------------------------------- |
| **Decentralization**      | No                  | Data distributed across Walrus network |
| **Censorship Resistance** | No                  | No single point of control             |
| **Auto Encryption**       | Manual setup        | Built-in AES-256 encryption            |
| **Auto Renewal**          | N/A                 | Automated storage epoch management     |
| **Acceleration**          | CloudFront required | Built-in Railgun acceleration (Beta)   |

### Performance Optimizations

* **Sub-100ms Latency**: Railgun acceleration (Beta) provides faster access than traditional CDNs
* **Global Edge Network**: Automatically cached at edge locations worldwide
* **Smart Routing**: Optimized data paths reduce transfer times
* **Compression**: Automatic compression for supported file types

## Authentication & Security

### Access Control

Nami Storage supports standard S3 authentication methods:

* **Access Key & Secret Key**: Standard AWS-style credentials
* **Signature Version 4**: Industry-standard request signing
* **Bucket Policies**: Fine-grained access control (coming soon)
* **ACLs**: Object-level access control lists (coming soon)

### Enhanced Security

Beyond standard S3 security, Nami Storage provides:

* **End-to-End Encryption**: AES-256 encryption by default
* **Decentralized Verification**: Cryptographic proof of data integrity
* **No Vendor Lock-in**: Your data remains accessible even if Nami goes offline

## Common Use Cases

<CardGroup cols={2}>
  <Card title="Static Website Hosting" icon="globe">
    Host websites with decentralized reliability
  </Card>

  <Card title="Backup & Archive" icon="archive">
    Long-term storage with automated renewal
  </Card>

  <Card title="Media Storage" icon="image">
    Fast delivery of images and videos
  </Card>

  <Card title="Data Lakes" icon="database">
    Analytics data with Web3 guarantees
  </Card>

  <Card title="API Data Storage" icon="server">
    Application data with global availability
  </Card>

  <Card title="Content Distribution" icon="share-nodes">
    Global content delivery with Railgun (Beta)
  </Card>
</CardGroup>

## Best Practices

### Naming Conventions

* Use DNS-compatible bucket names
* Avoid periods in bucket names for SSL compatibility
* Follow S3 naming guidelines for objects

### Performance Optimization

* Enable compression for text-based files
* Use multipart uploads for large files (>100MB)
* Leverage Railgun (Beta) caching for frequently accessed content
* Structure object keys to avoid hotspotting

### Cost Optimization

* Bundle small files when possible (auto-bundling coming soon)
* Use lifecycle policies for data archival
* Monitor usage through Nami Cloud dashboard

## Getting Started

Ready to migrate? Here's how to get started:

1. **[Create Account](https://nami.cloud)** - Sign up for Nami Cloud
2. **Generate Credentials** - Create your S3-compatible access keys
3. **Test Migration** - Try the migration with a test bucket first
4. **Full Migration** - Update all applications to use Nami Storage

## Need Help?

* [Authentication Guide](/api-reference/storage/authentication) - Setup credentials
* [API Reference](/api-reference/storage/create-bucket) - Complete API documentation
* [Code Examples](/api-reference/storage/put-object#code-examples) - Working examples in multiple languages

Experience the power of decentralized storage with the simplicity of S3. Your data will be more secure, more available, and truly yours.
