Show / Hide Table of Contents

S3 Source

See S3 Bucket sample for an example of how to use the S3 Bucket source.

Syntax

S3: String|Expression
Events: [ String ]
Prefix: String
Suffix: String

Properties

Events

The Events section specifies the S3 events that trigger an invocation of the Lambda function. By default, the Lambda function only reacts to s3:ObjectCreated:* events. See S3 Event Notification Types and Destinations for a complete list of S3 events.

Required: No

Type: List of String

Prefix

The Prefix attribute specifies a filter to limit invocations to object key names that begin with the attribute value.

Required: No

Type: String

S3

The S3 attribute specifies the name of a resource parameter of type AWS::S3::Bucket that is the origin of the events.

Required: Yes

Type: String or Expression

Suffix

The Suffix attribute specifies a filter to limit invocations to object key names that end with the attribute value.

Required: No

Type: String

Examples

Listen to s3:ObjectCreated:* on the S3 bucket.

Sources:
  - S3: MyFirstBucket

Listen to custom events on the S3 bucket for specific S3 keys.

Sources:
  - S3: MySecondBucket
    Events:
      - "s3:ObjectCreated:*"
      - "s3:ObjectRemoved:*"
    Prefix: images/
    Suffix: .png
In This Article
Back to top Generated by DocFX