aws-cdk-lib.aws_codepipeline_actions.S3Trigger

enum S3Trigger

LanguageType name
.NETAmazon.CDK.AWS.CodePipeline.Actions.S3Trigger
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodepipelineactions#S3Trigger
Javasoftware.amazon.awscdk.services.codepipeline.actions.S3Trigger
Pythonaws_cdk.aws_codepipeline_actions.S3Trigger
TypeScript (source)aws-cdk-lib » aws_codepipeline_actions » S3Trigger

How should the S3 Action detect changes.

This is the type of the S3SourceAction.trigger property.

Example

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

NameDescription
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.

NONE

The Action will never detect changes - the Pipeline it's part of will only begin a run when explicitly started.


POLL

CodePipeline will poll S3 to detect changes.

This is the default method of detecting changes.


EVENTS

CodePipeline will use CloudWatch Events to be notified of changes.

Note that the Bucket that the Action uses needs to be part of a CloudTrail Trail for the events to be delivered.