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

# Amazon S3

> Use bunny.net CDN as a caching layer for Amazon S3 to accelerate file delivery and reduce origin costs.

Bunny CDN caches files from your Amazon S3 bucket and delivers them from a global edge network, speeding up delivery and reducing egress costs. This guide walks you through the setup in a few steps.

> [!TIP]
>
> Prefer to keep your files on bunny.net? [Bunny Storage](/docs/storage.md) is globally replicated object storage with tight CDN integration, and it offers an [S3-compatible API](/docs/storage/s3.md) (currently in beta).

**1. Create an S3 bucket and upload a file**

If you don't already have a bucket, sign in to the [AWS Management Console](https://console.aws.amazon.com/s3/), click **Create bucket**, and follow the prompts (see [Amazon's guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html) for details). Upload a file and give it public-read permissions.

![Creating an Amazon S3 bucket](https://mintcdn.com/bunnynet-cb9733c2/1bTPx1eyQm8EK8W3/images/cdn/integrations/storage/s3-create-bucket.png?fit=max\&auto=format\&n=1bTPx1eyQm8EK8W3\&q=85\&s=3d70280fdddebeac9b72d361c3ab181f)

**2. Find your bucket's public URL**

Click the uploaded file to open its details, which include the public link. Copy only the first part of the link, the hostname and bucket path, for example `https://s3-eu-west-1.amazonaws.com/your-bucket/`. Don't include the file name.

![Getting the S3 object URL](https://mintcdn.com/bunnynet-cb9733c2/1bTPx1eyQm8EK8W3/images/cdn/integrations/storage/s3-get-url.png?fit=max\&auto=format\&n=1bTPx1eyQm8EK8W3\&q=85\&s=5fa45c1a05ef1c567b5bab9b6caa6a03)

**3. Create a Pull Zone**

Log in to your [bunny.net dashboard](https://dash.bunny.net) and create a new Pull Zone. Give it a name (this becomes your CDN hostname) and paste the URL from the previous step into the **Origin URL** field, then choose your pricing tiers and click **Add Pull Zone**. For details, see [How to create your first Pull Zone](/docs/cdn/quickstart.md).

![Adding a Pull Zone with the S3 bucket as origin](https://mintcdn.com/bunnynet-cb9733c2/1bTPx1eyQm8EK8W3/images/cdn/integrations/storage/s3-add-pull-zone.png?fit=max\&auto=format\&n=1bTPx1eyQm8EK8W3\&q=85\&s=f31a16f3818d759f1b1a6a95e6b7970e)

**4. Test your Pull Zone**

Once the configuration has synced to the edge network, request a file through your Pull Zone hostname, for example:

```
https://mys3zone.b-cdn.net/bunny.jpg
```

If the file is served, Bunny CDN is caching content from your bucket. Replace your S3 URLs with the Bunny CDN URLs in your application to start serving cached content.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.