

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

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

`S3` 이벤트 소스 유형을 설명하는 객체.

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

 AWS Serverless Application Model (AWS SAM) 템플릿에서이 개체를 선언하려면 다음 구문을 사용합니다.

### 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)
```

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

 `Bucket`   <a name="sam-function-s3-bucket"></a>
S3 버킷 이름 이 버킷은 같은 템플릿 내에 있어야 합니다.  
*유형*: 문자열  
*필수 항목 여부:* 예  
*CloudFormation 호환성*:이 속성은 `AWS::S3::Bucket` 리소스의 `[BucketName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-name)` 속성과 유사합니다. 이것은 SAM에 속한 필수적 필드입니다. 이 필드는 이 템플릿에서 생성된 S3 버킷에 대한 참조만 허용합니다.

 `Events`   <a name="sam-function-s3-events"></a>
Lambda 함수의 호출 목적이 되는 Amazon S3 버킷 이벤트입니다. 유효한 값 목록은 [Amazon S3 지원 이벤트 유형](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#supported-notification-event-types)을 참조하세요  
*형식*: 문자열 \$1 목록  
*필수 항목 여부:* 예  
*CloudFormation 호환성*:이 속성은 `AWS::S3::Bucket` `LambdaConfiguration` 데이터 유형의 `[Event](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-event)` 속성으로 직접 전달됩니다.

 `Filter`   <a name="sam-function-s3-filter"></a>
어느 Amazon S3 객체가 Lambda 함수를 호출할 것인지 결정하는 필터링 규칙입니다. Amazon S3 키 이름 필터링에 대한 자세한 내용은 [Amazon Simple Storage Service 개발자 안내서](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)의 *Amazon S3 이벤트 알림 구성*을 참조하세요.  
*유형*: [NotificationFilter](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html)  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::S3::Bucket` `LambdaConfiguration` 데이터 유형의 `[Filter](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html)` 속성으로 직접 전달됩니다.

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

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

S3 이벤트의 예시.

#### 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
```