App Events to AWS S3 Buckets
Last updated
Last updated
Data collected around App Events can be streamed from Airkit to AWS S3 buckets, allowing you to investigate the data in external analytics platforms.
Here, we walk through how to set up your S3 bucket to receive App Event Logs logs from Airkit.
Create your S3 Bucket in AWS. When creating the bucket, select ACLs disabled
.
After creating your S3 Bucket, provide Airkit permission to your S3 bucket via the following AWS IAM policy.
{{BUCKET-NAME}}
: name of the S3 bucket you created
{{aws_region}}
: name of the region your organization is provisioned
US - us-west-2
AP - ap-southeast-2
EU - eu-central-1
{{organization_id}}
: The ID of your organization. To get your org id, see Getting Application Metadata
In Airkit Console,visit Settings > Logs and App Notifiers. The UI will look as follows:
Under App Event Logs > S3 bucket, click edit to set an new S3 bucket, and then insert the S3 bucket name you created previously into the pop-up window that appears:
Click Verify. Airkit will write a test file named airkit-verify-test-{{timestamp}}
Once configured, every few minutes, Airkit will send relevant Events in a new file to the S3 bucket.
The structure of the exported data depends on the type Event being sent. Broadly speaking, there are two kinds of Events that can be sent as App Events: Session Events and Platform Events. However, there is a lot of variation to the data structure even within these categories, as the relevant information depends on the Event details.
There are a couple standard fields that are part of every Event:
organizationId
eventTime
appId
branchId
sessionId
deployId
type
kind
- for App Events, this will always be "Session"
It is the type
field that usually determines what other fields that will be part of the export. For instance, consider the following export where type = session_start
:
In addition to the standard fields, this export also contains the fields actorId
, sourceRuntime
, sourceDetail
, appEventSchema
, appEventId
, ipAddresses
, billingCode
, and defaultMetrics
, which all contain pertinent information regarding a newly-started Journey.