Skip to content

Flow

Source: src/AWS/AppFlow/Flow.ts

An Amazon AppFlow flow. A flow transfers data between a source connector and one or more destination connectors, applying field-mapping tasks. The credential-free S3-to-S3 path is directly testable; other connectors require a ConnectorProfile with vendor credentials.

For an S3 source, the bucket policy must authorize the appflow.amazonaws.com service principal (s3:GetObject + s3:ListBucket on the source; s3:PutObject and the multipart/ACL actions on the destination), and the source prefix must contain at least one object when the flow is created — AppFlow validates connectivity by listing the source at CreateFlow time and rejects an empty prefix with ConnectorServerException.

const flow = yield* AppFlow.Flow("Copy", {
triggerConfig: { triggerType: "OnDemand" },
sourceFlowConfig: {
connectorType: "S3",
sourceConnectorProperties: {
S3: { bucketName: srcBucket, bucketPrefix: "input" },
},
},
destinationFlowConfigList: [
{
connectorType: "S3",
destinationConnectorProperties: {
S3: { bucketName: dstBucket, bucketPrefix: "output" },
},
},
],
tasks: [
{
taskType: "Map_all",
sourceFields: [],
connectorOperator: { S3: "NO_OP" },
taskProperties: {},
},
],
});