EventAction
Source:
src/AWS/DataExchange/EventAction.ts
An AWS Data Exchange event action — an auto-export rule that copies every newly published revision of an ENTITLED data set into your S3 bucket the moment the provider publishes it. This is the subscriber-side automation primitive: subscribe to a product (or accept a data grant), attach an event action, and fresh data lands in your bucket with no polling.
Event actions require an entitled data set — creating one against an
owned data set fails with a ValidationException.
Auto-Exporting Entitled Data
Section titled “Auto-Exporting Entitled Data”Export new revisions to S3
import * as AWS from "alchemy/AWS";
const landing = yield* AWS.S3.Bucket("Landing", {});
const autoExport = yield* AWS.DataExchange.EventAction("AutoExport", { dataSetId: entitledDataSetId, exportRevisionToS3: { bucket: landing.bucketName },});Encrypted export with a key pattern
const autoExport = yield* AWS.DataExchange.EventAction("AutoExport", { dataSetId: entitledDataSetId, exportRevisionToS3: { bucket: landing.bucketName, keyPattern: "prices/${Revision.CreatedAt}/${Asset.Name}", encryption: { type: "aws:kms", kmsKeyArn: key.keyArn }, },});