Data Locker—raw data in an S3 bucket

At a glance: Data Locker writes raw-data to an AWS S3 bucket in near-real-time (lag 6 hours.) 

Data Locker

Data locker main features

  • Apps: supports multiple apps which added automatically
  • Simplicity: data is written to an Amazon S3 bucket 
  • Reliability: data is stored in AWS which ensures data persistence
  • Flexibility: choose what data you want to include 
  • Granularity: data is segmented into report types, days and hours
  • Accessibility: pull data when required
  • Data freshness: 6-hour lag using or daily depending on the report type. The lag-time is the same (6 hours) irrespective of the app-specific time zone. 
  • Bucket ownership:
    • Get the data from an AppsFlyer owned bucket (data retention by AppsFlyer: 30 days)
    • AppsFlyer writes the data directly to a bucket owned by you

Reports available in Data Locker

UA and retargeting
Category Report type (topic) Data freshness* Organic/Non-organic Unique to Data Locker
User acquisition clicks 6-hour lag Both
Retargeting clicks_retargeting 6-hour lag Both
User acquisition impressions 6-hour lag Both
Retargeting impressions_retargeting 6-hour lag Non-organic
User acquisition installs 6-hour lag Both  
User acquisition inapps 6-hour lag Both  
User acquisition attributed_ad_revenue Daily** Non-organic  
User acquisition organic_ad_revenue Daily** Organic  
Retargeting retargeting_ad_revenue Daily** Non-organic  
Retargeting conversions_retargeting 6-hour lag Non-organic  
Retargeting inapps_retargeting 6-hour lag Non-organic  
Retargeting retargeting_sessions 6-hour lag Both
User acquisition sessions 6-hour lag Both
User acquisition uninstalls 6-hour lag Non-organic  
User acquisition organic_uninstalls Daily Organic
Report type (topic) Data freshness*
blocked_installs 6-hour lag
blocked_inapps 6-hour lag
blocked_clicks 6-hour lag
[FF*] [AG*] post_attribution_installs Daily
People-Based Attribution
Report type (topic) Data freshness* Unique to Data Locker
web_events Daily
web_touch_points  Daily
[FF*] web_to_app Daily
[FF*] conversion-paths Daily
Key to abbreviations

* Key to abbreviations

[FF] Report fields are fixed by Appsflyer. They are not related to the fields selected for inclusion in reports.

[AG] Agency transparency not supported.

6-hour lag: Data is separated into arrival hour folders. That is the hour that the event was deposited to Data Locker. Some data Locker folders are written about six hours after the actual event time for real-time events. There are 24 folders for each hour of the day, from 0 to 23, and an additional folder for data that arriving late. The lag time is the same irrespective of the app-specific timezone.

Daily: Reports having a data freshness rate of daily are written to the h=23 folder. These reports are typically available at 06:00-12:00 UTC in the h=23 folder of the preceding day. For example, the report for data generated during Monday is in the Monday H=23 folder. The data is available after 06:00 UTC on Tuesday.

Daily**: Ad revenue data is available after 2 days, meaning that data generated during Monday, becomes available in the Monday H=23 folder after 06:00 UTC on Wednesday.

Data Locker architecture

Data partition

AppsFlyer creates an AWS principal (ARN in Amazon terms) and generates credentials for that principal. A policy is then set allowing the principal to browse and retrieve files from their bucket.

In the bucket, data is organized by report type. The data for a given report is stored in its folder. 

Folder and file structure

  • Folder structure is: af-ext-reports/<Home Folder>/data-locker-hourly/t=<event-type>/dt=<date YYYY-MM-dd>/h=<Hour h>
    • The Home Folder is the Home Folder that appears in the Credentials window (see the setup instruction in the prior section) 
    • For example, for the date 2016-08-12 the report appears in: s3://af-ext-reports/12345678911-acc-1abc234/data-locker-hourly/t=installs/dt=2016-08-12/
  • The day folder dt=yyyy-mm-dd is split into 25 hourly folders. These folders represent the arrival hour of the event, not the event hour of the event itself. The folders are named h=0, h=1, h=2, and so on, up to h=23, and h=late. For example, the folder h=0 contains the events that arrive between 00:00 UTC and 01:00 UTC similarly, the folder h=20 contains the events that arrive between 20:00 and 21:00.
  • In each folder:

    • Data is split into multiple files to avoid large files. File names are: part-00000, part-00001, part-00002, and so on. There can be up to 1000 files. We may increase this maximum number in the future without advance notice.

    • The last file to be written is an empty file named _SUCCESS. This file is a flag indicating that no further data will be written to the folder. As such, do not read data in a folder before verifying that the _SUCCESS file exists. Note: The _SUCCESS flag is also written in cases where there is no data to be written to the folder.

  • Late folder

    • The late folder contains events of the preceding day that arrived after midnight. Meaning arrives between 00:00–02:00 UTC of the following day. For example, a user installs an app on Monday 08:00, the event arrives on Tuesday at 01:00. The event is recorded in Monday's late folder. 

    • The folder also contains the _SUCCESS flag as described in the previous section.

    • Data in the late folder are not recorded in any other folder.

    • Automated processes should look for data in the late folder similarly to that of other folder. 

File structure and format

  • Data Locker files are based on Raw Data Reports V5 (see: Raw Data Reports V5).
  • The actual data file is in CSV format but it has no file extension.
  • The report files are zipped in .gz format.
  • Each file has a header row.
  • Values that have a coma in them are contained between double quotes `"`, for example `"iPhone6,1"`.

Using reports as data sources

You can use the data from the reports and add it to your own databases. To extract the data and add it to your databases you need to know the report format. Data Locker reports are based on Raw Data Reports. However, the final report format depends on the fields that you choose to include.

Creating hourly folders


Timezone and currency

App-specific timezone and currency settings don't have an effect on data in Data Locker.

  • Timezone: Data Locker reports use the UTC timezone
  • Currency: The field event_revenue_usd is in USD. 

Configure Data Locker

Prerequisite: The admin needs to configure Data Locker. Team members can view the settings. 

AppsFlyerAdmin_us-en.png To configure Data Locker the

  1. In Appsflyer, go to Integration > Data Locker. 
  2. Select one or more or all apps.  Select all to automatically include apps you add in the future.
  3. Click Apply
  4. [optional] Media Sources (default=All. Means that media sources added in the future are automatically added.): Select one or more Media Sources to include in reports. 
  5. Click Apply
  6. Select one or more report types.
  7. [optional] In-app events (default=All. Means that in-app events added in the future are automatically added.): Select the in-app events to include. If you have more than 100 in-app event types, you can't search for them. Enter their names exactly to select them. 
  8. Click Apply
  9. [optional] Fields (default=All): Select the fields to include in the reports. Note: We add fields from time to time take this into account in your data import process..
  10. Click Create Bucket.

Bucket credentials

Once the configuration is saved, a dedicated AWS bucket is created. The bucket details appear at the top right-hand corner of the screen. They include the Bucket Name, Home Folder, and credentials for reading data from the bucket.


  • The bucket is accessible using the credentials.
  • Access to the bucket is audited. 
  • AppsFlyer is the bucket owner. 
  • The credentials provide you with read-only access to the bucket.
  • Data is updated hourly after a six-hour delay.
  • Each file includes the selected apps.
  • Retention: Files and folders are available for 30 days. After 30 days the data is deleted

Data retrieval

Use your preferred S3 data retrieval tool, AWS CLI, or one of the tools described in the sections that follow.


Before you begin:

  • Install the AWS CLI on your computer.
  • In AppsFlyer, go to Data Locker, retrieve the information contained in the credentials panel as it is needed to perform this procedure. 

To use AWS CLI:

  1. Open the terminal. To do so in Windows, <Windows>+<R>, click OK.
    The command line window opens.
  2. Enter aws configure
  3. Enter the AWS Access Key as it appears in the credentials panel.
  4. Enter your AWS Secret Key as it appears in the credentials panel.
  5. Enter eu-west-1
  6. Press Enter (None)

Use the CLI commands that follow as needed.

In the following commands, the value of {home-folder} can be found

To list folders in your bucket

aws s3 ls s3://af-ext-reports/{home-folder}/data-locker-hourly/

Listing files and folders

There are three types of folders in your Data Locker bucket:

  • Report Type t=
  • Date dt=
  • Hour h=

To list all the reports of a specific report type:

aws s3 ls s3://af-ext-reports/{home-folder}/data-locker-hourly/t=installs/

To list all the reports of a specific report type for a specific day:

aws s3 ls s3://af-ext-reports/{home-folder}/data-locker-hourly/t=installs/dt=2019-01-17

To list all the reports of a specific report, in a specific hour of a specific day:

aws s3 ls s3://af-ext-reports/{home-folder}/data-locker-hourly/t=installs/dt=2019-01-17/h=23

To download files for a specific date:

aws s3 cp s3://af-ext-reports/<home-folder>/data-locker-hourly/t=installs/dt=2020-08-01/h=9/part-00000.gz ~/Downloads/

Cyber Duck

Before you begin:

  • Install the Cyber Duck client.
  • In AppsFlyer, go to Data Locker, retrieve the information contained in the credentials panel. You will need this information when you configure Cyber Duck. 

To configure Cyber Duck:

  1. In Cyber Duck, click Action.
  2. Select New Bookmark. The window opens.
  3. In the first field, (marked [1] in the screenshot that follows,) select Amazon S3.


  4. Complete the fields as follows:
    • Nickname: free text
    • Server:
    • Access Key ID: copy the AWS Access Key as it appears in the credentials panel in AppFlyer
    • Secret Access Key: copy the Bucket Secret key as it appears in the credentials panel in AppsFlyer.
    • Path: {Bucket Name}/{Home Folder} For example: af-ext-reports/1234-abc-ffffffff
  5. Close the window, to do so, use the X in the upper-right corner of the window.
  6. Select the connection.
    The data directories are displayed.

Amazon S3 browser

Before you begin:

  • Install the Amazon S3 Browser.
  • In AppsFlyer, go to Data Locker, retrieve the information contained in the credentials panel as it is needed to perform this procedure. 

To configure the Amazon S3 Browser:

  1. In the S3 browser, Click Accounts > Add New Account.
    The Add New Account window opens.


  2. Complete the fields as follows:
    • Account Name: free text. 
    • Access Key ID: copy the AWS Access Key as it appears in the credentials panel. 
    • Secret Access Key: copy the Bucket Secret key as it appears in the credentials panel.
    • Select Encrypt Access Keys with a password and enter a password. Make a note of this password.
    • Select Use secure transfer. 
  3.  Click Save changes.
  4. Click Buckets > Add External Bucket.
    The Add External Bucket window opens.


  5. Enter the Bucket name. The Bucket name has the following format: {Bucket Name}/{Home Folder}. The values needed for bucket name and home folder appear in the credentials window. 
  6. Click Add External bucket.
    The bucket is created and displays in the left panel of the window.
    You can now access the Data Locker files. 

Additional information

Traits and Limitations

Trait Remarks 
Ad networks Not for use by ad networks. 
Agencies Not for use by agencies
App-specific time zone Not Applicable. Data locker folders are divided into hours using UTC. The actual events contain times in UTC. Convert the times to any other time zone as needed. Irrespective of your app time-zone the lag from event occurrence until it is recorded in Data Locker remains the same; that is 6 hours. 
App-specific currency  Not supported
Size limitations Not applicable
Data freshness Files are updated hourly with a lag of six hours from the event time.
Historical data Not supported. Event data is sent after configuring Data Locker. If you need historical data use Pull API. 
Team member access Team members cannot configure Data Locker. 
Single app/multiple app Multi app support. Data locker is at the account level


  • Symptom: Unable to retrieve data using AWS CLI
  • Error message: An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied
  • Cause: The AWS credentials being used not the correct credentials for the AppsFlyer bucket. This can be caused by having multiple or invalid credentials on your machine. 
  • Solution:
    1. Use a different method, like Cyber Duck to access the bucket, meaning not the CLI. Do this to verify that the credentials you are using are working. If you are able to connect using Cyber Duck, this indicates an issue with the credentials cache. 
    2. Refresh the AWS credentials cache.
      Screenshot from AWS`mceclip0.png 
Was this article helpful?