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

# AWS S3

> Configure AWS S3 cloud storage for file uploads and AI-generated content in Aikeedo. Industry-standard object storage with high durability and availability.

## Overview

AWS S3 (Simple Storage Service) is Amazon's industry-standard object storage service, offering high durability, availability, and scalability. It's one of the most popular choices for cloud storage due to its reliability and extensive feature set.

**Key features:**

* **High durability** - 99.999999999% (11 9's) durability
* **Global availability** - Multiple regions worldwide
* **Scalable storage** - Virtually unlimited storage capacity
* **Security features** - Encryption, access controls, and compliance
* **Integration ecosystem** - Works with thousands of AWS services
* **S3-compatible API** - Easy integration with existing tools

## Prerequisites

Before configuring AWS S3:

1. **AWS Account** - Create an account at [aws.amazon.com](https://aws.amazon.com)
2. **S3 Bucket** - Create a bucket for your files
3. **IAM User** - Create a user with S3 permissions
4. **API Credentials** - Generate access key and secret key
5. **Domain** - Optional custom domain for CloudFront CDN

## Configuration Steps

<Steps>
  <Step title="Create S3 Bucket">
    In your AWS Console:

    1. Go to [**S3** service](https://console.aws.amazon.com/s3/home)
    2. Select your preferred region from the region selector in the top-right corner
    3. Click **Create bucket**
    4. Choose a unique bucket name (e.g., `your-app-storage`)
    5. Use default configuration (sufficient for most use cases)
    6. Click **Create bucket**

    <Note>
      Bucket names must be globally unique across all AWS accounts. Names must be 3-63 characters long, contain only lowercase letters, numbers, dots, and hyphens, and cannot start or end with a dot or hyphen.
    </Note>
  </Step>

  <Step title="Configure IAM User">
    Create an IAM user with S3 permissions:

    1. Go to **IAM** > **Users** > **Create user**
    2. Enter username (e.g., `aikeedo-storage`)
    3. Leave **"Provide user access to the AWS Management Console"** unchecked (programmatic access only)
    4. Click **Next**
    5. Select **"Attach policies directly"**
    6. Search for and select **AmazonS3FullAccess** policy
    7. Click **Next** to review, then **Create user**
    8. Go to the user's **Security credentials** tab
    9. Click **Create access key**
    10. Select **"Application running outside AWS"** as the use case
    11. Click **Next** to proceed
    12. Copy the **Access key ID** and **Secret access key**
    13. Save credentials securely
  </Step>

  <Step title="Configure CORS">
    Set up CORS for your domain:

    1. Go to your S3 bucket
    2. Click **Permissions** tab
    3. Scroll to **Cross-origin resource sharing (CORS)**
    4. Click **Edit** and add this configuration:

    ```json theme={null}
    [
      {
        "AllowedHeaders": ["*"],
        "AllowedMethods": ["GET"],
        "AllowedOrigins": ["https://yourdomain.com", "https://www.yourdomain.com"]
      }
    ]
    ```

    5. Click **Save changes**

    <Note>
      Replace `yourdomain.com` with your actual domain. For development, you can use `*` for AllowedOrigins, but this is not recommended for production.
    </Note>
  </Step>

  <Step title="Configure in Aikeedo">
    In your admin panel:

    1. Go to **Settings** > **Cloud storage** > **AWS S3**
    2. Toggle **Status** to **Enabled**
    3. Enter **Endpoint**:
       * Go to your S3 bucket in AWS Console
       * Copy the **Bucket website endpoint** or use format: `https://your-bucket.s3.region.amazonaws.com/`
       * For example: `https://my-app-storage.s3.us-east-1.amazonaws.com/`
    4. Select **Region** from dropdown (must match your bucket's region)
    5. Enter **Custom domain** (optional CloudFront CDN domain)
    6. Enter **Bucket name**: Your S3 bucket name
    7. Enter **Path prefix** (optional subfolder)
    8. Enter **Access key**: Your IAM access key ID
    9. Enter **Secret key**: Your IAM secret access key
    10. Click **Save changes**
  </Step>

  <Step title="Activate AWS S3">
    Enable AWS S3 as your storage provider:

    1. Go to **Settings** > **File storage**
    2. In the **Adapter** dropdown, select **AWS S3**
    3. Configure **Group files** and **Secure URLs** as needed
    4. Click **Save changes**
  </Step>
</Steps>

## Configuration Fields

**Required fields:**

* **Endpoint** - S3 bucket endpoint URL (e.g., `https://your-bucket.s3.region.amazonaws.com/`)
* **Region** - AWS region where your bucket is located
* **Bucket name** - Name of your S3 bucket
* **Access key** - IAM user access key ID for authentication
* **Secret key** - IAM user secret access key for authentication

**Optional fields:**

* **Custom domain** - Custom domain for CloudFront CDN (if you have CloudFront distribution set up)
* **Path prefix** - Optional subfolder within your bucket for organizing files

## Troubleshooting

**Access denied errors:**

* Verify IAM user has correct permissions for the specific bucket
* Check bucket policy settings and public access settings
* Ensure access keys are valid and not expired
* Verify bucket name matches exactly (case-sensitive)

**CORS issues:**

* Check CORS configuration in S3 bucket permissions
* Verify allowed origins include your domain (with https\://)
* Ensure allowed methods include GET (sufficient for Aikeedo)
* Wait a few minutes for CORS changes to propagate

**Files not uploading:**

* Verify bucket name and region are correct
* Check network connectivity to AWS
* Ensure bucket exists and is accessible
* Verify endpoint URL format is correct
* Check if bucket has any restrictions or policies blocking uploads

**Performance issues:**

* Consider using CloudFront CDN for better global performance
* Check if you're using the correct region for your users
* Monitor AWS CloudWatch for any service issues

## Need Help?

If you need assistance with Aikeedo:

<CardGroup cols={2}>
  <Card title="Professional Support" icon="headset" href="https://aikeedo.com/support/">
    Get expert help from our team with a paid support subscription
  </Card>

  <Card title="Troubleshooting Guide" icon="wrench" href="/setup/troubleshooting">
    Check common issues and solutions
  </Card>
</CardGroup>
