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

# S3 Event Archiving

> Set up PlayFab legacy event archiving to an Amazon S3 bucket from scratch, covering bucket creation, credentials, and enabling event flow export.

<Note>
  We recommend using [Azure Data Explorer (ADX) Connections](/services/playfab/data-analytics/export-data/data-connection-adx) to manage your performance and cost.
</Note>

PlayFab allows you to archive the entire event flow using the
Amazon S3 bucket. This tutorial shows you the steps required to configure event archiving from scratch.

## Configuring Amazon S3 bucket

Once you create an Amazon account:

* Navigate to **Services (1)**.
* Select **S3 (2)**.

<img src="https://mintcdn.com/microsoft-4404708b/68AB2fedpk3M7e-n/images/playfab/data-analytics/legacy/tutorials/select-amazon-s3.png?fit=max&auto=format&n=68AB2fedpk3M7e-n&q=85&s=338854ecf6a1efe3a7a2d762e5b7ba09" alt="Select Amazon S3" width="612" height="558" data-path="images/playfab/data-analytics/legacy/tutorials/select-amazon-s3.png" />

* On the **S3** page, you'll have an overview of all your buckets.
* Use the **Create bucket** button to create a new bucket.

<img src="https://mintcdn.com/microsoft-4404708b/MjJ0-cTsb1bpaMcX/images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket.png?fit=max&auto=format&n=MjJ0-cTsb1bpaMcX&q=85&s=f0e6bb170efbe1975e8cb3a29ed8c7eb" alt="Amazon S3 - Create bucket" width="490" height="503" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket.png" />\
To create your new S3 bucket, you must go through a four-step wizard:

* You must assign a unique, DNS-compliant **Bucket name** for your bucket. Make sure to have that name available somewhere for copying and pasting. We'll need it when we configure PlayFab event archiving.
* When you're done, select the **Next** button.

<img src="https://mintcdn.com/microsoft-4404708b/MjJ0-cTsb1bpaMcX/images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket-enter-bucket-name.png?fit=max&auto=format&n=MjJ0-cTsb1bpaMcX&q=85&s=db59f403967b46ae1142c10dc3677db0" alt="Amazon S3 - Create bucket - enter bucket name" width="698" height="795" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket-enter-bucket-name.png" />

* This step offers you the option of adding **Versioning**, **Logging**, and **Tags** for your **Bucket**.
* Select the **Next** button when you're done **(1)**.

<img src="https://mintcdn.com/microsoft-4404708b/MjJ0-cTsb1bpaMcX/images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket-add-versioning.png?fit=max&auto=format&n=MjJ0-cTsb1bpaMcX&q=85&s=d7903240a3d8b9b3f4595aeea47d62a5" alt="Amazon S3 - Create bucket - add versioning" width="694" height="795" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket-add-versioning.png" />

* During this step, make sure that you have **Read/Write** access **(1)** for objects.
* Select the **Next** button **(2)** when you're done.

<img src="https://mintcdn.com/microsoft-4404708b/MjJ0-cTsb1bpaMcX/images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket-enable-read-write.png?fit=max&auto=format&n=MjJ0-cTsb1bpaMcX&q=85&s=6bd528084d2fe247739c7ecdf774c320" alt="Amazon S3 - Create bucket - enable read/write" width="693" height="797" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket-enable-read-write.png" />

In this last step, double-check your settings and select the **Create bucket** button **(1)**.

<img src="https://mintcdn.com/microsoft-4404708b/MjJ0-cTsb1bpaMcX/images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket-check-settings.png?fit=max&auto=format&n=MjJ0-cTsb1bpaMcX&q=85&s=c32ea61496cd9c8ea23fd7bd98d8d190" alt="Amazon S3 - Create bucket - check settings" width="689" height="788" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-create-bucket-check-settings.png" />

## Configuring Amazon access

In order to archive events, you'll need to give PlayFab access to the bucket on your behalf.

This is done with an access key.

* Double-check that you have your newly created bucket in the list of S3 services **(1)**.
* Select your account **Name** in the top right corner **(2)**.
* Then select **My Security Credentials (3)**.

<img src="https://mintcdn.com/microsoft-4404708b/68AB2fedpk3M7e-n/images/playfab/data-analytics/legacy/tutorials/amazon-s3-open-my-security-credentials.png?fit=max&auto=format&n=68AB2fedpk3M7e-n&q=85&s=3560f9bc536933d959eddb4367e9abfe" alt="Amazon S3 - Open My Security Credentials" width="1003" height="423" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-open-my-security-credentials.png" />

* Locate the **Access Key** list.
* Select the **Create New Access Key** button.

<img src="https://mintcdn.com/microsoft-4404708b/68AB2fedpk3M7e-n/images/playfab/data-analytics/legacy/tutorials/amazon-s3-security-credentials-open-create-access-key.png?fit=max&auto=format&n=68AB2fedpk3M7e-n&q=85&s=28fc8f8c19ab57484fd339850e5b0e7a" alt="Amazon S3 - Security Credentials - Open Create Access Key" width="614" height="551" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-security-credentials-open-create-access-key.png" />

* Expand the **Access Key** data **(1)**.
* Save the **Access Key ID (2)** and **Secret Access Key (3)**.
* Make sure they're available for copy/paste. We'll need them when we configure **PlayFab Event** archiving.
* Select the **Close** button **(4)**.

<img src="https://mintcdn.com/microsoft-4404708b/68AB2fedpk3M7e-n/images/playfab/data-analytics/legacy/tutorials/amazon-s3-security-credentials-save-access-key-data.png?fit=max&auto=format&n=68AB2fedpk3M7e-n&q=85&s=48420e0359549e8c0c53f8a41523880f" alt="Amazon S3 - Save Access Key data" width="790" height="400" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-security-credentials-save-access-key-data.png" />

## Configuring PlayFab event archiving

When your Amazon S3 bucket is ready, it's time to set up the PlayFab side of things.

We need to pass the access key data and bucket name to PlayFab to enable event archiving.

To access the PlayFab **Event Archive**:

1. Select **Analytics** in the menu on the left.
2. Then select the **Event Archive** tab.
3. Finally, select the **Update Settings** button, as shown below.

<img src="https://mintcdn.com/microsoft-4404708b/68AB2fedpk3M7e-n/images/playfab/data-analytics/legacy/tutorials/game-manager-analytics-event-archive.png?fit=max&auto=format&n=68AB2fedpk3M7e-n&q=85&s=f123ae0e754bcba0676dc4518e0fd3aa" alt="Game Manager - Analytics - Event Archive" width="1366" height="940" data-path="images/playfab/data-analytics/legacy/tutorials/game-manager-analytics-event-archive.png" />

The **Update Settings** page offers you the following settings:

1. The **Amazon S3 bucket name** (use the one you created while configuring the **Amazon S3 Bucket**).
2. **Prefix** is the *root folder* under which PlayFab stores all the relevant data.
3. **Access key ID** (use the one you obtained while configuring access to the Amazon account).
4. **Secret key** (use the one you obtained while configuring access to the Amazon account).
5. Select the **Save Settings** button when everything is in place.

<img src="https://mintcdn.com/microsoft-4404708b/68AB2fedpk3M7e-n/images/playfab/data-analytics/legacy/tutorials/game-manager-analytics-event-archive-update-settings.png?fit=max&auto=format&n=68AB2fedpk3M7e-n&q=85&s=bced36af632f00a5436f3fbc44427f52" alt="Game Manager - Analytics - Event Archive - Update Settings" width="684" height="605" data-path="images/playfab/data-analytics/legacy/tutorials/game-manager-analytics-event-archive-update-settings.png" />

PlayFab should present you with a nice page, indicating that event archiving is enabled.

<img src="https://mintcdn.com/microsoft-4404708b/68AB2fedpk3M7e-n/images/playfab/data-analytics/legacy/tutorials/game-manager-analytics-event-archiving-enabled.png?fit=max&auto=format&n=68AB2fedpk3M7e-n&q=85&s=d94fde938812c2847a9786dc4363068a" alt="Game Manager - Analytics - Event Archiving Enabled" width="591" height="491" data-path="images/playfab/data-analytics/legacy/tutorials/game-manager-analytics-event-archiving-enabled.png" />

Make sure to post some events and then check your bucket on the Amazon portal.

After a short period of time, you should see that new compressed JSON streams are appearing, nicely broken out by title, event name, year, month and day.

<img src="https://mintcdn.com/microsoft-4404708b/68AB2fedpk3M7e-n/images/playfab/data-analytics/legacy/tutorials/amazon-s3-event-bucket.png?fit=max&auto=format&n=68AB2fedpk3M7e-n&q=85&s=6e2853e0ca67eca80941110ed2ce53af" alt="Amazon S3 - Event Bucket" width="917" height="432" data-path="images/playfab/data-analytics/legacy/tutorials/amazon-s3-event-bucket.png" />


## Related topics

- [Set up an Amazon S3 bucket](/services/playfab/data-analytics/legacy/configure-s3-bucket.md)
- [PlayFab data and analytics documentation](/services/playfab/data-analytics/index.md)
- [What is PlayFab?](/services/playfab/get-started/what-is-playfab.md)
- [Archiving and retrieving multiplayer server logs](/services/playfab/multiplayer/servers/archiving-and-retrieving-multiplayer-server-logs.md)
- [Data Connections - Overview](/services/playfab/data-analytics/export-data/data-connection-overview.md)
