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

# Sync From S3

> How to use AWS CLI to synchronise telemetry data from the S3 bucket to the local file system for viewing in SimTelLab.

## Overview

This SOP describes how to pull telemetry data from the AWS S3 bucket down to your local file system so it can be viewed in SimTelLab.

> [!NOTE]
>
> The **Installing and Configuring AWS CLI** and **Creating the Sync File** steps are only needed on the first pass. **Syncing the Data** is required each time new data is available.

***

## Prerequisites

* AWS IAM User Account
* Access Key
* Secret Access Key

> [!NOTE]
>
> If you do not have these yet, request them through a system administrator. Contact Matt Smith at [matt.smith@smedleygroup.com](mailto:matt.smith@smedleygroup.com).

***

## Installing and Configuring AWS CLI

**1. Install AWS CLI v2**

Visit the AWS CLI v2 download page and install it. You will now have the local folder structure created in `Program Files` and `C:/Users/XXXX`.

**2. Navigate to the .aws folder**

Navigate to `C:/Users/XXXX/.aws`.

> [!NOTE]
>
> If the `.aws` folder does not exist, download and extract the provided `.aws.zip` file and place the extracted contents into this location.

![.aws folder in file explorer](https://mintcdn.com/smedleygroup/GpbEczoFeGD6bcyh/images/od/rs/aws-folder.png?fit=max\&auto=format\&n=GpbEczoFeGD6bcyh\&q=85\&s=e239c568464602e83828b550f0a5a149)

**3. Configure the config file**

Open the `config` file in Notepad++. It should be empty. Enter the following, replacing the profile name with whatever you wish (here `matt` is used):

```ini theme={null}
[profile matt]
region = eu-west-2
output = json
```

Save and close the `config` file.

**4. Configure the credentials file**

Open the `credentials` file in Notepad++. It should be empty. Enter the following, ensuring the profile name matches the one set in `config`, and replacing the placeholders with your access keys from the system administrator:

```ini theme={null}
[matt]
aws_access_key_id = <ACCESS KEY HERE>
aws_secret_access_key = <SECRET ACCESS KEY HERE>
```

Save and close the `credentials` file.

***

## Creating the Sync File

**1. Navigate to the SimTelLab data folder**

Navigate to your local file system where you are storing SimTelLab data.

> [!NOTE]
>
> If this is your first time setting this up, download the pre-built folder structure and extract it into `C:/Databases`.

**2. Navigate to the database folder**

Navigate to `C:/Databases/SimTelLabDatabaseFKL`.

**3. Create the sync file**

Create a new text file and rename it `sync.bat`. Ignore any warnings about the file extension making the file unusable.

**4. Add the sync command**

Open `sync.bat` in Notepad++ and enter the following, replacing `<PROFILE>` with the profile name you set in the `.aws` files:

```bat theme={null}
aws s3 sync s3://telemetry-data-sg-prod/STL-database/2025 "C:\Databases\SimTelLabDatabaseFKL\Data\2025" --profile <PROFILE>
```

Save and close the `sync` file.

***

## Syncing the Data

**1. Run the sync script**

Double-click `sync.bat` in File Explorer. The batch script will run and a command window will pop up.

![Sync script running in command window](https://mintcdn.com/smedleygroup/GpbEczoFeGD6bcyh/images/od/rs/sync-running.png?fit=max\&auto=format\&n=GpbEczoFeGD6bcyh\&q=85\&s=4a801ba1ef636c1030914c23e4e6fc10)

**2. Monitor the download**

If new data is available, each file will be printed to the command line as it downloads.

![Files downloading in command window](https://mintcdn.com/smedleygroup/GpbEczoFeGD6bcyh/images/od/rs/sync-downloading.png?fit=max\&auto=format\&n=GpbEczoFeGD6bcyh\&q=85\&s=eae5cc1bb89400fc1280a807c4de9c96)

**3. Wait for completion**

Once syncing has finished, the command window will close automatically.


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