

# S3 Intelligent-Tiering 사용
<a name="using-intelligent-tiering"></a>

S3 Intelligent-Tiering 스토리지 클래스를 사용하여 스토리지 비용을 자동으로 최적화할 수 있습니다. S3 Intelligent-Tiering은 액세스 패턴이 변화할 때 액세스 계층 사이에서 세분화된 객체 수준으로 데이터를 이동하여 자동 비용 절감 효과를 제공합니다. 비동기식으로 액세스할 수 있는 데이터의 경우 AWS Management Console, AWS CLI 또는 Amazon S3 API를 사용하여 S3 Intelligent-Tiering 스토리지 클래스 내에서 자동 아카이브 기능을 사용 설정하도록 선택할 수 있습니다.

## S3 Intelligent-Tiering으로 데이터 이동
<a name="moving-data-to-int-tiering"></a>

S3 Intelligent-Tiering에는 두 가지의 데이터 이동 방법이 있습니다. 콘솔에서 S3 Intelligent-Tiering으로 객체를 직접 업로드하거나 `PUT` 작업을 사용하여 프로그래밍 방식으로 업로드할 수 있습니다. 자세한 내용은 [객체의 스토리지 클래스 설정](sc-howtoset.md) 섹션을 참조하세요. 또한, S3 수명 주기 구성을 구성하여 객체를 S3 Standard 또는 S3 Standard-Infrequent Access에서 S3 Intelligent-Tiering으로 이전할 수도 있습니다.

### Direct PUT을 사용하여 S3 Intelligent-Tiering에 데이터 업로드
<a name="moving-data-to-int-tiering-directPUT"></a>

[PUT](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) API 작업을 사용하여 S3 Intelligent-Tiering 스토리지 클래스에 객체를 업로드할 경우 [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax) 요청 헤더에 S3 Intelligent-Tiering을 지정합니다.

다음 요청은 `myBucket` 버킷에 이미지 `my-image.jpg`를 저장합니다. 요청은 `x-amz-storage-class` 헤더를 사용하여 객체가 S3 Intelligent-Tiering 스토리지 클래스를 사용하여 저장되도록 요청합니다.

**Example**  

```
PUT /my-image.jpg HTTP/1.1
Host: myBucket.s3.<Region>.amazonaws.com (http://amazonaws.com/)
Date: Wed, 1 Sep 2021 17:50:00 GMT
Authorization: authorization string
Content-Type: image/jpeg
Content-Length: 11434
Expect: 100-continue
x-amz-storage-class: INTELLIGENT_TIERING
```

### S3 수명 주기를 사용하여 S3 Standard 또는 S3 Standard - Infrequent Access에서 S3 Intelligent-Tiering으로 데이터 전환
<a name="moving-data-to-int-tiering-lifecycle"></a>

S3 수명 주기 구성에 규칙을 추가하여 Amazon S3이 객체를 하나의 스토리지 클래스에서 다른 스토리지 클래스로 전환하도록 유도할 수 있습니다. 지원되는 전환 및 관련 제약 조건에 대한 자세한 내용은 [S3 수명 주기를 사용하여 객체 전환](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-transition-general-considerations.html)을 참조하세요.

버킷 또는 접두사 수준에서 S3 수명 주기 구성을 지정할 수 있습니다. 이 S3 수명 주기 구성 규칙에서 필터는 키 접두사(`documents/`)를 지정합니다. 따라서 이 규칙은 `documents/` 및 `documents/doc1.txt`와 같은 키 이름 접두사 `documents/doc2.txt`가 있는 객체에 적용됩니다. 이 규칙은 생성된 지 0일 후에 객체를 S3 Intelligent-Tiering 스토리지 클래스로 전환하도록 Amazon S3에 지시하는 `Transition` 작업을 지정합니다. 이 경우 객체는 생성 후 자정 UTC에 S3 Intelligent-Tiering으로 전환할 수 있습니다.

**Example**  

```
<LifecycleConfiguration>
  <Rule>
    <ID>ExampleRule</ID>
    <Filter>
       <Prefix>documents/</Prefix>
    </Filter>
    <Status>Enabled</Status>
    <Transition>
      <Days>0</Days>
      <StorageClass>INTELLIGENT_TIERING</StorageClass>
    </Transition>
 </Rule>
</LifecycleConfiguration>
```

버전 관리가 사용 설정된 버킷은 하나의 현재 객체 버전과 0개 이상의 최신이 아닌 객체 버전을 유지합니다. 최신 객체 버전과 최신이 아닌 객체 버전에 대해 별도의 수명 주기 규칙을 정의할 수 있습니다.

자세한 내용은 [수명 주기 구성의 요소](intro-lifecycle-rules.md) 섹션을 참조하세요.

## S3 Intelligent-Tiering Archive Access 및 Deep Archive Access 계층 사용
<a name="enable-auto-archiving-int-tiering"></a>

몇 분에서 몇 시간 내에 액세스할 수 있는 데이터에 대한 가장 낮은 스토리지 비용을 얻기 위해 AWS Management Console, AWS CLI 또는 Amazon S3 API로 버킷, 접두사 또는 객체 태그별 구성을 생성하여 Archive Access 계층을 하나 또는 둘 다 활성화할 수 있습니다.

### S3 콘솔 사용
<a name="enable-auto-archiving-int-tiering-console"></a>

**S3 Intelligent-Tiering 자동 아카이브 사용 설정**

1. AWS Management Console에 로그인한 후 [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/)에서 Amazon S3 콘솔을 엽니다.

1. **버킷** 목록에서 원하는 버킷의 이름을 선택합니다.

1. [**속성(Properties)**]을 선택합니다.

1. **S3 Intelligent-Tiering 아카이브 구성(S3 Intelligent-Tiering Archive configurations)** 섹션으로 이동하여 **구성 생성(Create configuration)**을 선택합니다.

1. **아카이브 구성 설정(Archive configuration settings)** 섹션에서 S3 Intelligent-Tiering 아카이브 구성에 대해 설명하는 구성 이름을 지정합니다.

1. **구성 범위 선택(Choose a configuration scope)**에서 사용할 구성 범위를 선택합니다. 필요한 경우 공유 접두사, 객체 태그 또는 이 둘의 조합을 사용하여 버킷 내의 지정된 객체로 구성 범위를 제한할 수 있습니다.

   1. 구성 범위를 제한하려면 **하나 이상의 필터를 사용하여 이 구성 범위 제한(Limit the scope of this configuration using one or more filters)**을 선택합니다.

   1. 단일 접두사를 사용하여 구성의 범위를 제한하려면 **접두사(Prefix)** 아래에 접두사를 입력합니다.

   1. 객체 태그를 사용하여 구성의 범위를 제한하려면 **태그 추가(Add tag)**를 선택하고 키 값을 입력합니다.

1. **상태(Status)**에서 **사용(Enable)**을 선택합니다.

1. **아카이브 설정(Archive settings)** 섹션에서 사용 설정할 Archive Access 계층 중 하나 또는 둘 다를 선택합니다.

1. **생성(Create)**을 선택합니다.

### AWS CLI 사용
<a name="enable-auto-archiving-int-tiering-cli"></a>

다음 AWS CLI 명령을 사용하여 S3 Intelligent-Tiering 구성을 관리할 수 있습니다.
+ [https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-bucket-intelligent-tiering-configuration.html](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-bucket-intelligent-tiering-configuration.html)
+ [https://docs.aws.amazon.com/cli/latest/reference/s3api/get-bucket-intelligent-tiering-configuration.html](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-bucket-intelligent-tiering-configuration.html)
+ [https://docs.aws.amazon.com/cli/latest/reference/s3api/list-bucket-intelligent-tiering-configurations.html](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-bucket-intelligent-tiering-configurations.html)
+ [https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-intelligent-tiering-configuration.html](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-intelligent-tiering-configuration.html)

AWS CLI 설정에 대한 지침은 **Amazon S3 API 참조의 [AWS CLI를 사용하여 Amazon S3에서 개발](https://docs.aws.amazon.com/AmazonS3/latest/API/setup-aws-cli.html)을 참조하세요.

AWS CLI를 사용할 경우 구성을 XML 파일로 지정할 수 없습니다. 대신 JSON을 지정해야 합니다. 다음은 XML S3 Intelligent-Tiering 구성과 AWS CLI 명령에서 지정할 수 있는 그에 상당하는 JSON의 예입니다.

다음 예제에서는 지정된 버킷에 S3 Intelligent-Tiering 구성을 배치합니다.

**Example [https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-intelligent-tiering-configuration.html](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-intelligent-tiering-configuration.html)**  

```
{
  "Id": "string",
  "Filter": {
    "Prefix": "string",
    "Tag": {
      "Key": "string",
      "Value": "string"
    },
    "And": {
      "Prefix": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
        ...
      ]
    }
  },
  "Status": "Enabled"|"Disabled",
  "Tierings": [
    {
      "Days": integer,
      "AccessTier": "ARCHIVE_ACCESS"|"DEEP_ARCHIVE_ACCESS"
    }
    ...
  ]
}
```

```
PUT /?intelligent-tiering&id=Id HTTP/1.1
Host: Bucket.s3.amazonaws.com
<?xml version="1.0" encoding="UTF-8"?>
<IntelligentTieringConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <Id>string</Id>
   <Filter>
      <And>
         <Prefix>string</Prefix>
         <Tag>
            <Key>string</Key>
            <Value>string</Value>
         </Tag>
         ...
      </And>
      <Prefix>string</Prefix>
      <Tag>
         <Key>string</Key>
         <Value>string</Value>
      </Tag>
   </Filter>
   <Status>string</Status>
   <Tiering>
      <AccessTier>string</AccessTier>
      <Days>integer</Days>
   </Tiering>
   ...
</IntelligentTieringConfiguration>
```

### PUT API 작업 사용
<a name="enable-auto-archiving-int-tiering-api"></a>

지정된 버킷에 대해 [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html) 작업을 사용하고 버킷당 최대 1,000개의 S3 Intelligent-Tiering 구성을 구성할 수 있습니다. 공유 접두사 또는 객체 태그를 사용하여 버킷 내 객체를 Archive Access 계층에 적합하게 정의할 수 있습니다. 공유 접두사 또는 객체 태그로 사용함으로써 특정한 비즈니스 애플리케이션, 워크플로우, 또는 내부 조직에 맞춰 적용할 수 있습니다. 또한 Archive Access 계층, Deep Archive Access 계층 또는 둘 다를 활성화할 수 있습니다.