> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.metalocator.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Importing from Amazon S3

Follow the below steps to import a CSV data file from an Amazon S3 Bucket into MetaLocator.

The first step is to ensure your CSV files are ready and available in an Amazon S3 bucket.

## Creating and Configuring the Amazon S3 Bucket

AWS recommends using IAM permissions and least-privilege policies for this type of access, and access keys are used for programmatic access to AWS resources.

### Goal

Create credentials that can:

* List the contents of one specific S3 bucket.
* Download files from that bucket.
* Not upload, delete, modify, or access other buckets.

### 1. Create the S3 bucket

1. Sign in to the AWS Console.
2. Go to **S3**.
3. Click **Create bucket**.
4. Enter a globally unique bucket name, for example:

```
my-company-download-files
```

1. Choose the AWS Region.
2. Leave **Block all public access** enabled.
3. Keep ACLs disabled unless you have a specific reason to use them.
4. Enable encryption if desired.
5. Click **Create bucket**.

### 2. Create an IAM policy for download-only access

Go to **IAM → Policies → Create policy → JSON**.

Use this policy, replacing `YOUR-BUCKET-NAME` with the actual bucket name:

```
{  
  "Version": "2012-10-17",  
  "Statement": [  
    {  
      "Sid": "ListOnlyThisBucket",  
      "Effect": "Allow",  
      "Action": [  
        "s3:ListBucket"  
      ],  
      "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME"  
    },  
    {  
      "Sid": "DownloadOnlyFromThisBucket",  
      "Effect": "Allow",  
      "Action": [  
        "s3:GetObject"  
      ],  
      "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*"  
    }  
  ]  
}
```

Example with a real bucket name:

```
{  
  "Version": "2012-10-17",  
  "Statement": [  
    {  
      "Sid": "ListOnlyThisBucket",  
      "Effect": "Allow",  
      "Action": [  
        "s3:ListBucket"  
      ],  
      "Resource": "arn:aws:s3:::my-company-download-files"  
    },  
    {  
      "Sid": "DownloadOnlyFromThisBucket",  
      "Effect": "Allow",  
      "Action": [  
        "s3:GetObject"  
      ],  
      "Resource": "arn:aws:s3:::my-company-download-files/*"  
    }  
  ]  
}
```

Name the policy something like:

```
DownloadOnly-my-company-download-files
```

This grants only `s3:ListBucket` on the bucket itself and `s3:GetObject` on objects inside the bucket. AWS S3 permissions distinguish bucket-level actions from object-level actions, so both resource ARNs are needed.

---

### 3. Create an IAM user for programmatic access

1. Go to **IAM → Users**.
2. Click **Create user**.
3. Enter a name such as:

```
s3-download-only-user
```

1. Do **not** give the user AWS Console access unless required.
2. On permissions, choose **Attach policies directly**.
3. Select the policy you created:

```
DownloadOnly-my-company-download-files
```

1. Click **Create user**.

---

### 4. Create the Access Key ID and Secret Access Key

1. Open the IAM user you just created.
2. Go to the **Security credentials** tab.
3. Under **Access keys**, click **Create access key**.
4. Choose the use case, usually **Application running outside AWS** or equivalent.
5. Confirm the recommendation notice.
6. Click **Create access key**.
7. Copy or download the credentials.

You will receive:

```
AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY
```

Important: AWS only shows the secret access key once. Store it securely when it is created. If it is lost, you must delete the key and create a new one.

### 5. Test the Credentials

1. Login to MetaLocator
2. Click Locations -> Import
3. Choose Amazon S3
4. Enter your Access ID, Secret Key, Region and Bucket Name.
5. Provide a path if needed to indicate any sub-directory to load files from.
6. Click Load File List

## Import Data​

At this stage, if you have not uploaded any CSV files into this bucket, you will see an error that there are no CSV files available. Otherwise, if successful, the "Files" dropdown will show files available for download as shown below:

[![](https://storage.crisp.chat/users/helpdesk/website/-/d/f/0/b/df0b5201003c3000/9a8d7679-602d-41e9-8dc8-5d30ad_sm3ybu.png)](https://downloads.intercomcdn.com/i/o/yn1vvwtq/2388744756/379a062f833dc05957011fae0f88/image.png?expires=1794511800&signature=c9ff466201283d6741235cd97c4db88f27061cfe4f94684a0b5412b0d2ed72df&req=diMvHs56mYZaX%2FMW1HO4zcBMUFXxEuS9XWdvN1BAzXn7eRM5uuGEB0xtuZpR%0AZAzqVyPIXUP%2B%2BOwfbaI%3D%0A)

Choose a file from the "Files" list and click Next.

Click **Next**, and the import process will continue as usual.

Be sure to appropriately map your CSV columns to MetaLocator System columns as provided during the next step in the [import process](http://www.metalocator.com/data-import/).