Lesson 2 of 6 Batch Ingestion and Integration Services

Ingesting SaaS Data with Amazon AppFlow

This lesson explains how Amazon AppFlow moves data from SaaS applications such as Salesforce, SAP and ServiceNow into AWS without code, so data engineers do not need to write and maintain API clients for each application.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify AppFlow sources and destinations.
  • Choose between on-demand, scheduled and event-triggered flows.
  • Describe the transformations and security options of a flow.

Sources and destinations

Amazon AppFlow moves data between software-as-a-service (SaaS) applications and AWS without code. It reads from applications such as Salesforce, SAP through OData, ServiceNow, Zendesk, Slack, Google Analytics and Marketo, and writes to Amazon S3, Amazon Redshift, Snowflake or back into SaaS applications such as Salesforce. Along the way it can filter, map and validate fields. It is the usual answer when a data lake must receive data from a SaaS application with no custom integration. The following table summarises the principal sources and destinations.

SourcesDestinations
Salesforce, SAP (OData), ServiceNow, Zendesk, Slack, Google Analytics, Marketo and many othersAmazon S3, Amazon Redshift, Snowflake, and SaaS applications such as Salesforce
True or false

What AppFlow does

Exam skills 1.1.2 · 1.1.4

Decide whether each statement about Amazon AppFlow is true.

Log in to try this activity Interactive activities are free with an account.

Flow triggers

An AppFlow flow runs in one of three ways. An on-demand flow runs when it is started manually or through the API, which suits one-off loads and testing. A scheduled flow runs at a set interval and can transfer only the records that are new or changed since the last run, an incremental transfer, which suits regular synchronisation into a data lake. An event flow runs when the SaaS application reports a change, for near-real-time updates, where the source supports it. The following table summarises the triggers.

TriggerBehaviourUse for
On demandRuns when started manually or through the APIOne-off loads and testing
ScheduledRuns at an interval; can transfer only new or changed records (incremental)Regular synchronisation into the lake
EventRuns when the SaaS application emits a change eventNear-real-time updates, for supported sources

The following diagram shows an hourly Amazon AppFlow flow from Salesforce to the data lake, queried with Athena.

The hourly AppFlow flow. It reads the Salesforce Opportunity object through an OAuth connection, transfers only new and changed records, masks the owner's email address and writes Parquet to the raw zone partitioned by date, where a crawler registers partitions for Athena.
A crawler in S3 event mode registers each new partition.
Match the pairs

AppFlow triggers

Exam skills 1.1.5 · 1.1.6

Match each requirement with the AppFlow trigger.

Log in to try this activity Interactive activities are free with an account.

Transformation and security

AppFlow can prepare data while it transfers it from a SaaS application. Flows can map fields from the source to the destination, filter records, validate values, concatenate fields and mask sensitive fields, and they write to Amazon S3 in CSV, JSON or Parquet format, partitioned by date, so the data lands ready for querying.

Data is encrypted with AWS KMS. For supported applications, flows use AWS PrivateLink, so data does not cross the public internet. Credentials for each application are held in connector profiles, using OAuth where the application supports it, so no passwords are stored in flow definitions.

Select all that apply

AppFlow preparation and security

Exam skills 1.1.4 · 4.1.2

Identify what AppFlow flows can do.

Log in to try this activity Interactive activities are free with an account.
Worked example

Hourly Salesforce opportunities in the lake

Sales analysts want Salesforce opportunity data in the data lake, refreshed every hour, without the data team writing or maintaining API code. The AppFlow flow is configured as described in the following table.

SettingValue
SourceSalesforce connection (OAuth), Opportunity object
TriggerScheduled, every hour, transferring only new and changed records
MappingSelected fields, with the owner's email address masked
DestinationS3 raw zone, Parquet, partitioned by date

A Glue crawler in S3 event mode registers new partitions, and Athena queries the data. Incremental transfer keeps each run small and avoids Salesforce API limits.

Check yourself

How can SaaS data reach AWS through AppFlow without crossing the public internet?

Show answer

By using AppFlow with AWS PrivateLink, where the SaaS application supports it.

Exam Tips

Remember for the exam

  • To bring Salesforce or SAP data into S3 or Redshift with no code, use AppFlow.
  • For incremental SaaS transfers on a schedule, use an AppFlow scheduled flow.
  • To keep SaaS data off the public internet, use AppFlow with PrivateLink where supported.
  • AppFlow can write Parquet to S3, ready for Athena.
  • AppFlow can mask fields during transfer.