Skip to content
v2.274.0

S3Trigger Enum ​

How should the S3 Action detect changes.

This is the type of the S3SourceAction.trigger property.

Example ​

ts
import * as cloudtrail from 'aws-cdk-lib/aws-cloudtrail';

declare const sourceBucket: s3.Bucket;
const sourceOutput = new codepipeline.Artifact();
const key = 'some/key.zip';
const trail = new cloudtrail.Trail(this, 'CloudTrail');
trail.addS3EventSelector([{
  bucket: sourceBucket,
  objectPrefix: key,
}], {
  readWriteType: cloudtrail.ReadWriteType.WRITE_ONLY,
});
const sourceAction = new codepipeline_actions.S3SourceAction({
  actionName: 'S3Source',
  bucketKey: key,
  bucket: sourceBucket,
  output: sourceOutput,
  trigger: codepipeline_actions.S3Trigger.EVENTS, // default: S3Trigger.POLL
});

Members ​

MemberDescription
NONEThe Action will never detect changes - the Pipeline it's part of will only begin a run when explicitly started.
POLLCodePipeline will poll S3 to detect changes.
EVENTSCodePipeline will use CloudWatch Events to be notified of changes.

Referenced by ​