Skip to content

Exporting CRM Events (S3)

This feature automatically exports CRM events such as message sends, deliveries, and clicks generated in FlareLane to your Amazon S3 bucket every day. Because the exported data is stored in Parquet format, you can load it into your in-house data warehouse or BI tools to analyze campaign performance in detail.

Setup only needs to be done once. After you create an IAM Role in your AWS account to delegate write permissions to FlareLane and enter the destination bucket and permission details in the FlareLane console, data is loaded automatically starting the next day.

ItemDetails
Run scheduleRuns automatically every day at 03:00 KST (manual runs are not supported)
Target periodThe previous day, 00:00 ~ 24:00 based on the project timezone (default Asia/Seoul)
Target storageAmazon S3 (other clouds such as GCS and Azure Blob are not currently supported)
File formatParquet (snappy compression)
Authentication methodAWS STS cross-account AssumeRole. The project ID is verified via ExternalId to prevent confused deputy attacks.

Exported files are stored using the following path rule.

s3://<bucket>/<prefix>/<YYYY-MM-DD>/<YYYYMMDDHHMMSS>_part_<NNN>.parquet
// e.g. s3://my-flarelane-export/crm/2026-05-14/20260515030412_part_001.parquet

During setup, you can freely choose which events to export from the list below (at least 1 is required). Events of unselected types are excluded from the export.

CategoryEvent type
Pushpush.sent, push.aborted, push.failed, push.clicked
SMSsms.sent, sms.aborted, sms.failed, sms.delivered, sms.undelivered
Kakao AlimTalkkakaoalimtalk.sent, kakaoalimtalk.aborted, kakaoalimtalk.failed,
kakaoalimtalk.delivered,
kakaoalimtalk.undelivered
Kakao Brand Messagekakaobrandmessage.sent,
kakaobrandmessage.aborted,
kakaobrandmessage.failed,
kakaobrandmessage.delivered,
kakaobrandmessage.undelivered
Emailemail.sent, email.aborted, email.failed, email.delivered, email.opened, email.clicked, email.complaint
In-App Messageiam.displayed, iam.clicked, iam.closed

Please prepare the following items before starting setup.

ItemDescription
Amazon S3 bucketThe bucket where exported data will be loaded. We recommend using a separate bucket dedicated to CRM events.
CloudFormation stack / IAM Role creation permissionRequired to perform Step 2 in your AWS account.
Project IDYou can find this on the project settings screen in the console. It is used as the ExternalId condition value in the IAM Role Trust Policy.
FlareLane Glue Role ARNA value FlareLane provides separately. It is used as the Principal in the IAM Role Trust Policy.
KMS key ARN(Optional) Required only if the destination bucket is encrypted with SSE-KMS (a customer-managed key). Not needed for the SSE-S3 default encryption.

This is the CloudFormation template used for setup. Download it with the button below and use it in Step 2.

Download iam-role.yaml

Prepare the destination S3 bucket for the export in your AWS account. You may reuse an existing bucket, but we recommend using a separate bucket dedicated to CRM events.

Create an IAM Role and permissions so that FlareLane's Glue Job can write data to your S3 bucket and clean up temporary files (rename and cleanup) after loading. Choose one of the two methods below.

Section titled “Method A — CloudFormation template (recommended)”
  1. Download the template using the iam-role.yaml download button above.
  2. In the AWS console, go to CloudFormation → Create stack → With new resources (standard) and upload iam-role.yaml via Upload a template file.
  3. Enter the following parameters.
ParameterDescription
ProjectIdFlareLane project ID. Used as the ExternalId in the Trust Policy.
DestinationBucketNameThe S3 bucket name you prepared in Step 1
FlarelaneGlueRoleArnThe Glue Role ARN provided by FlareLane
KmsKeyArn(Optional) Enter only if the bucket is encrypted with SSE-KMS. Leave blank for SSE-S3.
  1. On the final review step, select the "I acknowledge that AWS CloudFormation might create IAM resources with custom names" checkbox and then create the stack.
  2. When the stack is created, copy the RoleArn value from the Outputs tab. You will use it for the console input in Step 3.
  3. (SSE-KMS buckets only) Copy the KmsKeyPolicyStatement JSON from the Outputs tab and add it as a Statement to that KMS key's Key policy (KMS console → Customer managed keys → select the key → edit key policy). Cross-account KMS access is not sufficient with IAM permissions alone; you must also allow this Role as a Principal in the key policy.

If you configure it directly in the console without using CloudFormation, follow the steps below.

(1) Create the IAM Role

  1. In the AWS console, go to IAM → Roles → Create role.
  2. Select Custom trust policy as the Trusted entity type and paste the JSON below as is. Replace the two placeholders with the actual values.
    • <FLARELANE_GLUE_ROLE_ARN>: The value provided by FlareLane
    • <FLARELANE_PROJECT_ID>: FlareLane project ID
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "<FLARELANE_GLUE_ROLE_ARN>"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "<FLARELANE_PROJECT_ID>"
}
}
}
]
}
  1. Enter any Role name (e.g., flarelane-crm-export-role) and create it.

(2) Attach the S3 inline policy

  1. On the detail screen of the Role you created, select Add permissions → Create inline policy.
  2. Switch the policy editor to JSON mode and paste the JSON below. Replace <DESTINATION_BUCKET> with the bucket name you prepared in Step 1.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::<DESTINATION_BUCKET>",
"arn:aws:s3:::<DESTINATION_BUCKET>/*"
]
}
]
}
  1. Enter any policy name (e.g., flarelane-crm-export-policy) and save it.

(3) Grant KMS permissions — SSE-KMS buckets only

If the destination bucket is encrypted with a KMS customer-managed key, you must configure the following two items in addition to the policy above.

  • Grant the Role KMS permissions (kms:GenerateDataKey, kms:Decrypt) and set the Resource to that key ARN.
  • Add a Statement to that KMS key's Key policy that allows this Role as a Principal. Cross-account KMS access is not sufficient with IAM permissions alone and must always be accompanied by key policy authorization.

Step 3: Enter the settings in the FlareLane console

Section titled “Step 3: Enter the settings in the FlareLane console”

On the Project settings → CRM event export screen in the FlareLane console, enter the following values.

FieldDescription
EnabledTurn the export on/off
S3 bucket nameThe bucket name you prepared in Step 1
S3 path prefixPath prefix within the bucket (optional)
IAM Role ARNThe ARN of the Role you created in Step 2 (for Method A, the stack Outputs RoleArn)
Event types to exportSelect from the Supported event types above

After saving and turning on the enable toggle, the export starts automatically from the next 03:00 KST.

The first run occurs between 03:00 ~ 03:30 KST the day after you enable it. Please check the following during the morning of that day.

  1. Verify that a <prefix>/<yesterday's date>/ directory has been created inside the destination S3 bucket.
  2. Verify that a file in the format <YYYYMMDDHHMMSS>_part_001.parquet exists in the directory.
  3. Open the Parquet file and check that the events from the previous day have been loaded correctly.

If the directory has not been created, please check the following items.

  • Whether the relevant events actually occurred on the previous day (if none occurred, even an empty directory is not created)
  • Whether the relevant events are included in the Event types to export filter you selected
  • Whether the sts:ExternalId value in the IAM Role Trust Policy matches your project ID
  • Whether the Resource ARN in the IAM Policy matches the actual bucket name
  • (For SSE-KMS buckets) Whether the export Role is allowed as a Principal in the KMS key's Key policy

If data is still not loaded even though all of the above items are correct, please contact the FlareLane support team.

Q. Can I receive all historical data from before the feature was enabled in one batch?

This is not supported. Data is loaded on a daily basis starting from the "previous day" after the time of enablement. If you need data from a past period, please contact the FlareLane support team.

Q. Yesterday's data is empty.

It is likely one of the following two cases.

  • There were no CRM events on that date (in this case the S3 directory itself is not created)
  • The type of the events that occurred is not included in the Event types to export filter

Q. What happens if I change the S3 path prefix midway?

Data is loaded to the new prefix path starting from the time of the change. Files stored under the existing prefix path are kept as is, and FlareLane does not move them automatically.

Q. I entered the IAM Role ARN incorrectly. Will that day's data be automatically loaded again?

It is not recovered automatically. If you correct the ARN to the right value and save, data is loaded normally starting the next day. If you need the data for the missing dates, please contact the FlareLane support team.

Q. Can I export to multiple S3 buckets simultaneously from a single project?

Currently only 1 destination bucket can be configured per project.