# S3SourceOptions

Options for S3 sources.

- Source: [`pipelines/lib/codepipeline/codepipeline-source.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline-source.ts#L286)
- Type last changed: v2.27.0 · 3 Jun 2022

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline_actions as codepipeline_actions } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { pipelines } from 'aws-cdk-lib';

declare const role: iam.Role;
const s3SourceOptions: pipelines.S3SourceOptions = {
  actionName: 'actionName',
  role: role,
  trigger: codepipeline_actions.S3Trigger.NONE,
};
```

## Properties

- `actionName`: string — The action name used for this source in the CodePipeline.

  **Default:** The bucket name

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The role that will be assumed by the pipeline prior to executing the `S3Source` action.

  **Default:** a new role will be generated

- `trigger`: [S3Trigger](/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.S3Trigger.html) = S3Trigger.POLL — How should CodePipeline detect source changes for this Action.

  Note that if this is S3Trigger.EVENTS, you need to make sure to include the source Bucket in a CloudTrail Trail,
  as otherwise the CloudWatch Events will not be emitted.
