

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# S3
<a name="sam-property-function-s3"></a>

Das Objekt, das einen `S3` Ereignisquellentyp beschreibt.

## Syntax
<a name="sam-property-function-s3-syntax"></a>

Verwenden Sie die folgende Syntax, um diese Entität in Ihrer Vorlage AWS Serverless Application Model (AWS SAM) zu deklarieren.

### YAML
<a name="sam-property-function-s3-syntax.yaml"></a>

```
  [Bucket](#sam-function-s3-bucket): String
  [Events](#sam-function-s3-events): String | List
  [Filter](#sam-function-s3-filter): [NotificationFilter](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html)
```

## Eigenschaften
<a name="sam-property-function-s3-properties"></a>

 `Bucket`   <a name="sam-function-s3-bucket"></a>
Name des S3 Buckets. Dieser Bucket muss in derselben Vorlage vorhanden sein.  
*Typ:* Zeichenfolge  
*Erforderlich*: Ja  
*CloudFormation Kompatibilität*: Diese Eigenschaft ähnelt der `[BucketName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-name)` Eigenschaft einer `AWS::S3::Bucket` Ressource. Dies ist ein Pflichtfeld in SAM. Dieses Feld akzeptiert nur einen Verweis auf den S3-Bucket, der in dieser Vorlage erstellt wurde

 `Events`   <a name="sam-function-s3-events"></a>
Das Amazon S3 S3-Bucket-Ereignis, für das die Lambda-Funktion aufgerufen werden soll. Eine Liste der gültigen Werte finden Sie unter Von [Amazon S3 unterstützte Ereignistypen](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#supported-notification-event-types).  
*Typ*: Zeichenfolge \$1 Liste  
*Erforderlich*: Ja  
*CloudFormation Kompatibilität*: Diese Eigenschaft wird direkt an die `[Event](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-event)` Eigenschaft des `AWS::S3::Bucket` `LambdaConfiguration` Datentyps übergeben.

 `Filter`   <a name="sam-function-s3-filter"></a>
Die Filterregeln, die bestimmen, welche Amazon S3 S3-Objekte die Lambda-Funktion aufrufen. Informationen zur Amazon S3 S3-Schlüsselnamenfilterung finden Sie unter [Konfiguration von Amazon S3 S3-Ereignisbenachrichtigungen](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) im *Amazon Simple Storage Service-Benutzerhandbuch*.  
*Typ:* [NotificationFilter](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html)  
*Required*: No  
*CloudFormation Kompatibilität*: Diese Eigenschaft wird direkt an die `[Filter](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html)` Eigenschaft des `AWS::S3::Bucket` `LambdaConfiguration` Datentyps übergeben.

## Beispiele
<a name="sam-property-function-s3--examples"></a>

### S3-Ereignis
<a name="sam-property-function-s3--examples--s3-event"></a>

Beispiel für ein S3-Event.

#### YAML
<a name="sam-property-function-s3--examples--s3-event--yaml"></a>

```
Events:
  S3Event:
    Type: S3
    Properties:
      Bucket:
        Ref: ImagesBucket     # This must be the name of an S3 bucket declared in the same template file
      Events: s3:ObjectCreated:*
      Filter:
        S3Key:
          Rules:
          - Name: prefix      # or "suffix"
            Value: value      # The value to search for in the S3 object key names
```