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

# Amazon S3

> Learn how to integrate Amazon S3 with Masivo CDP for data export and analytics

## What is Amazon S3 Integration?

The Amazon S3 integration is a **data warehouse destination** that allows you to export customer data, events, and transactions from Masivo to your Amazon S3 bucket. This integration enables you to store and analyze your loyalty program data using AWS services and third-party analytics tools. It supports **historical data backfill**, making it ideal for comprehensive data warehousing and analytics use cases.

## Key Features

<CardGroup cols={2}>
  <Card title="Data Warehouse" icon="database">
    Warehouse destination that supports historical data export and backfill
  </Card>

  <Card title="Selective Data Export" icon="filter">
    Choose exactly which data types to export: customers, events, purchases,
    transactions, rewards, wallets, tiers, and audiences
  </Card>

  <Card title="Flexible Format" icon="file">
    Export data in JSON or Parquet format for different use cases
  </Card>

  <Card title="Export Frequencies" icon="calendar">
    Configure export frequency: daily, weekly, or monthly based on your needs
  </Card>

  <Card title="Historical Backfill" icon="clock">
    Automatically backfills historical data based on your selected frequency
  </Card>

  <Card title="Secure Access" icon="shield">
    Uses IAM roles for secure, programmatic access to your S3 bucket
  </Card>
</CardGroup>

## Integration Type

### Amazon S3 as Warehouse Destination

Amazon S3 is configured as a **warehouse destination** that exports data to your S3 bucket. You have full control over which data types are exported, and the integration supports historical data backfill based on your configured export frequency.

## Data Flow

<Steps>
  <Step title="Data Collection">
    Customer data, events, and transactions are collected in Masivo
  </Step>

  <Step title="Processing">
    Data is validated and transformed for S3 export
  </Step>

  <Step title="Batch Export">
    Data is batched and compressed for efficient S3 upload
  </Step>

  <Step title="S3 Storage">
    Data is stored in organized folders within your S3 bucket
  </Step>
</Steps>

## Supported Data Types

You can selectively enable or disable each data type for export. The following data types are available:

<AccordionGroup>
  <Accordion title="Customers">
    * Customer profiles and attributes - User lifecycle events (create, update,
      delete) - Customer tags (optional) - Profile information and metadata
  </Accordion>

  <Accordion title="Events">
    * Customer behavior events - Engagement tracking - Custom event properties -
      Event timestamps and metadata
  </Accordion>

  <Accordion title="Purchases">
    * Purchase events and transaction data - Purchase details and metadata
  </Accordion>

  <Accordion title="Transactions">
    * Detailed transaction records - Financial transaction data - Transaction
      history
  </Accordion>

  <Accordion title="Rewards">
    * Reward records and redemption history - Reward program data
  </Accordion>

  <Accordion title="Wallets">
    * Wallet balance information - Wallet transaction history
  </Accordion>

  <Accordion title="Tiers">
    * Tier assignments - Tier change events - Tier membership data
  </Accordion>

  <Accordion title="Audiences">
    * Audience calculation events (when audiences are calculated) - Audience
      deletion events (when audiences are deleted)
  </Accordion>
</AccordionGroup>

## File Organization

Data is automatically organized in your S3 bucket based on the data type and export frequency you configure:

<Card title="S3 Folder Structure" icon="folder">
  <AccordionGroup>
    <Accordion title="Daily Frequency">
      Files organized by day: `{DATA_TYPE}/YYYY/MM/DD/` - Example:
      `CUSTOMER/2024/01/15/`
    </Accordion>

    <Accordion title="Weekly Frequency">
      Files organized by week: `{DATA_TYPE}/YYYY/MM/week-N/` - Example:
      `EVENT/2024/01/week-2/`
    </Accordion>

    <Accordion title="Monthly Frequency">
      Files organized by month: `{DATA_TYPE}/YYYY/MM/` - Example:
      `TRANSACTION/2024/01/`
    </Accordion>
  </AccordionGroup>
</Card>

## Export Formats

Choose between two file formats based on your analytics needs:

<CardGroup cols={2}>
  <Card title="JSON Format" icon="file-text">
    * Human-readable format - Larger file sizes - Easy to process with any tool
    * Default format - Best for: Quick data inspection, simple integrations
  </Card>

  <Card title="Parquet Format" icon="database">
    * Columnar storage format - Smaller file sizes (better compression) -
      Optimized for analytics and big data processing - Best for: Data warehouses,
      analytics platforms, cost optimization
  </Card>
</CardGroup>

## Export Frequencies

Configure how often data is exported to S3:

<CardGroup cols={3}>
  <Card title="Daily" icon="calendar">
    * Exports data every day - Files organized by day (YYYY/MM/DD) - Best for:
      Daily reporting and analytics - Default frequency
  </Card>

  <Card title="Weekly" icon="calendar">
    * Exports data once per week - Files organized by week (YYYY/MM/week-N) -
      Best for: Weekly reporting, batch processing
  </Card>

  <Card title="Monthly" icon="calendar">
    * Exports data once per month - Files organized by month (YYYY/MM) - Best
      for: Monthly reporting, long-term storage optimization
  </Card>
</CardGroup>

<Note>
  The export frequency determines when historical data backfill occurs.
  Historical data is automatically synced based on your selected frequency.
</Note>

## Benefits

<CardGroup cols={2}>
  <Card title="Data Warehouse" icon="database">
    Complete data warehouse solution with historical backfill support
  </Card>

  <Card title="Selective Export" icon="filter">
    Export only the data types you need, reducing storage costs and processing
    time
  </Card>

  <Card title="Data Analytics" icon="bar-chart">
    Use AWS analytics services like Athena, Redshift, or third-party tools
  </Card>

  <Card title="Flexible Configuration" icon="settings">
    Choose your preferred format (JSON/Parquet) and frequency
    (daily/weekly/monthly)
  </Card>

  <Card title="Data Backup" icon="archive">
    Secure backup of all customer and loyalty program data
  </Card>

  <Card title="Compliance" icon="shield">
    Meet data retention and compliance requirements
  </Card>
</CardGroup>

## Next Step

<CardGroup cols={2}>
  <Card title="Setup Guide" icon="wrench" href="/guides/CDP/integrations/amazon-s3/setup">
    Learn how to configure your S3 integration
  </Card>
</CardGroup>
