# Amazon S3

ExpanDrive supports the Amazon S3 API, letting you connect directly to AWS or to S3-compatible storage services including [DreamObjects](#dreamobjects-connection-parameters), [DigitalOcean Spaces](#digitalocean-spaces), and [Akamai Linode Object Storage](#linode-object-storage). On S3, your files and folders are stored inside top-level folders called buckets that are uniquely named throughout all of S3.

## Connection Parameters

Each S3 or S3-compatible connection in Expandrive provides parameters to control exactly what you're connecting to along with your credentials.

### Server

The address at which the service can be reached. For Amazon S3, use the default value of `https://s3.amazonaws.com`. For other [S3-compatible providers](#connecting-to-s3-compatible-services), use the address for their service.

### Access Key

The access key is your unique identifier for authentication. Think of it like a username for your S3 account. It's usually a 20-character alphanumeric string like `AKIAIOSFODNN7EXAMPLE`.

You can obtain this from your AWS IAM console (for Amazon S3) or from your storage provider's dashboard. Keep this confidential and never share it publicly.

As a best practice, use the access key of a user other than your root account user.

The access key and secret key work together as a pair for authentication. Either one alone is not useful; together they provide full access to your S3 resources.

### Secret Key

The secret key is your private authentication key that pairs with your access key. This is like a password.

When you save your connection info in ExpanDrive, the secret key is [securely stored](/security.md#authentication) within your local keychain.

### Custom Region

The region where your bucket resides, which varies depending on which provider you are using.

This field is optional because S3 bucket names are globally unique and can be identified even without the region specified. Providing the correct region improves performance and avoids the extra cost of requests being routed through the default region.

### Bucket

This field lets you restrict what buckets the connection can access on your account. [Bucket-level organization](#bucket-level-organization) is a hallmark of S3-compatible services; buckets are top-level folders of your S3 account that you can attach policies to.

If your credentials do not have access to list the buckets in your account, provide the bucket name in your connection parameters.

### Nickname

The nickname identifies the connection and appears as the volume label on the mounted drive.

## Bucket-Level Organization

Amazon S3 is organized into buckets, which are top-level folders that are uniquely named throughout the service. You can [attach policies to a bucket](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html) to [restrict access to particular users](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html#example-bucket-policies-folders) or [make hosted content available to the public](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html#example-bucket-policies-anonymous-user).

If you have permission to list buckets in your S3 account, ExpanDrive can mount the root of the account, showing you all your buckets.

You can instead restrict a mount to a specific bucket, or to a particular folder in a bucket, by typing the bucket name in the remote path section. This is useful if you only have access to a particular bucket or don't have permission to list the buckets for an account.

## Connecting to S3-Compatible Services

Many object storage services use APIs that behave the same as Amazon S3 APIs, and you can use ExpanDrive to connect to them with the S3 connector by changing the connection parameters.

### DreamObjects Connection Parameters

Override the Server parameter with the [hostname for your account](https://help.dreamhost.com/hc/en-us/articles/32254965300372-DreamObjects-cluster-differences), either `objects-us-east-1.dream.io` or `s3.us-east-005.dream.io`.

Supply the access key and secret key in the usual fields. This information is [associated with your DreamObjects user](https://help.dreamhost.com/hc/en-us/articles/215986357-DreamObjects-Keys).

### DigitalOcean Spaces

The DigitalOcean Spaces endpoint is `https://<region>.digitaloceanspaces.com`, where `<region>` is the DigitalOcean [datacenter region](https://docs.digitalocean.com/products/spaces/details/availability) where your bucket is located.

### Linode Object Storage

ExpanDrive can connect to Akamai Linode Object Storage. The server address is `https://<region>.linodeobjects.com`, where `<region>` is the [datacenter region](https://techdocs.akamai.com/cloud-computing/docs/object-storage-product-limits). If you only need to connect to a single bucket, you can use that [bucket's URL](https://techdocs.akamai.com/cloud-computing/docs/access-buckets-and-files-through-urls#bucket-url) instead for the server address.

[Create access keys](https://techdocs.akamai.com/cloud-computing/docs/manage-access-keys) for connecting to your bucket, and provide those within the access key and secret key fields.

### OpenStack Swift Object Storage

To use the S3 connector with your [Swift Object Storage](https://www.openstack.org/software/releases/dalmatian/components/swift), provide the host name of your OpenStack cloud server. You need to generate credentials from your chosen authentication service to use for the access key and secret key.

### Rackspace Object Storage

ExpanDrive supports connecting to Rackspace Object Storage as an Amazon S3 connection by supplying the correct server endpoint and credentials.

Check the [Namespace Details](https://docs.rackspace.com/docs/namespace-details) in the Rackspace Portal for your Access URL and username. The Access URL is the server address you will connect to, and you will provide the username as the Access Key for the connection. Create a Secret Key for the user to use as the Secret Key in your ExpanDrive connection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.expandrive.com/integrations/amazon-s3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
