S3 Exports

Learn how to set up S3 export

Save your subscription events to your Amazon S3 bucket as .csv files.

📘

Schedule

Adapty sends your data every 24h at 4:00 UTC.

How to set up integration

To start receiving data, you'll need the following credentials:

  1. Access key ID
  2. Secret access key
  3. S3 bucket name

📘

Nested directories

You can specify nested directories in the S3 bucket name field, e.g. adapty-events/com.sample-app

19701970

How to create S3 credentials

This guide will help you create necessary credentials in your AWS Console.

1. Create Access Policy

Go to the IAM Policy Dashboard in your AWS Console and choose ‘Create policy’: https://console.aws.amazon.com/iamv2/home#/policies

55205520

In Policy editor paste the following JSON and change adapty-s3-integration-test to your bucket name:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowListObjectsInBucket",
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::adapty-s3-integration-test"
        },
        {
            "Sid": "AllowAllObjectActions",
            "Effect": "Allow",
            "Action": "s3:*Object",
            "Resource": [
                "arn:aws:s3:::adapty-s3-integration-test/*",
                "arn:aws:s3:::adapty-s3-integration-test"
            ]
        },
        {
            "Sid": "AllowBucketLocation",
            "Effect": "Allow",
            "Action": "s3:GetBucketLocation",
            "Resource": "arn:aws:s3:::adapty-s3-integration-test"
        }
    ]
}
25222522

You can add tags (optional) and click Next. Name your policy and click Create policy.

25122512

2. Create IAM user

In this step you'll create user that have access to the policy. Go to https://console.aws.amazon.com/iamv2/home#/users
And click Create user

46404640

Give user a name, choose Access key – Programmatic access and proceed to permissions.

28282828

Choose Add user to group and click Create group

38943894

Select the Policy you crated previously and click Create group

33063306

Once group is created, select it and proceed to the next step.

28302830

Click Create user.

27982798

And finally download .csv or just copy and paste credentials from the dashboard.

39303930

Table structure

ColumnDescription
profile_idAdapty user ID.
event_typeLower cased event name. Refer to the Events section to learn event types.
event_datetimeISO 8601 date.
original_transaction_idThe transaction identifier of the original purchase.
subscription_expires_atThe Expiration date of subscription. Usually in the future.
environmentCould be Sandbox or Production.
revenue_usdRevenue in USD. Can be empty.
proceeds_usdProceeds in USD. Can be empty.
revenue_localRevenue in local currency. Can be empty.
proceeds_localProceeds in local currency. Can be empty.
customer_user_idDeveloper user ID. For example, it can be your user UUID, email, or any other ID. Null if you didn't set it.
storeCould be app_store or play_store.
product_idProduct id in Apple/Google store.

Did this page help you?