

# S3 버킷 키에 대한 설정 보기
<a name="viewing-bucket-key-settings"></a>

Amazon S3 콘솔, REST API, AWS Command Line Interface(AWS CLI) 또는 AWS SDK를 사용하여 버킷 수준 또는 객체 수준에서 S3 버킷 키에 대한 설정을 볼 수 있습니다.

S3 버킷 키는 Amazon S3에서 AWS KMS로 가는 요청 트래픽을 줄여 AWS Key Management Service(SSE-KMS)를 사용한 서버 측 암호화 비용을 절감합니다. 자세한 내용은 [Amazon S3 버킷 키를 사용하여 SSE-KMS 비용 절감](bucket-key.md) 섹션을 참조하세요.

버킷 구성에서 S3 버킷 키 설정을 상속받은 버킷 또는 객체에 대한 S3 버킷 키 설정을 보려면 `s3:GetEncryptionConfiguration` 작업을 수행할 권한이 필요합니다. 자세한 내용은 *Amazon Simple Storage Service API Reference*의 [GetBucketEncryption](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)을 참조하세요.

## S3 콘솔 사용
<a name="bucket-key-settings"></a>

S3 콘솔에서 버킷 또는 객체에 대한 S3 버킷 키 설정을 볼 수 있습니다. S3 버킷 키 설정은 원본 객체에 S3 버킷 키가 이미 구성되어 있는 경우를 제외하고는 버킷 구성에서 상속됩니다.

동일한 버킷의 객체와 폴더는 다른 S3 버킷 키 설정을 가질 수 있습니다. 예를 들어, REST API를 사용하여 객체를 업로드하고 객체에 대해 S3 버킷 키를 사용 설정하는 경우, 대상 버킷에서 S3 버킷 키가 사용 중지되어 있더라도 객체는 대상 버킷에 S3 버킷 키 설정을 유지합니다. 또 다른 예로, 기존 버킷에 대해 S3 버킷 키를 사용 설정하면 이미 버킷에 있는 객체는 S3 버킷 키를 사용하지 않습니다. 그러나 새 객체에는 S3 버킷 키가 사용 설정되어 있습니다.

**버킷에 대한 S3 버킷 키 설정 보기**

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

1. 왼쪽 탐색 창에서 **버킷(Buckets)**을 선택합니다.

1. **버킷(Buckets)** 목록에서 S3 버킷 키를 사용 설정할 버킷을 선택합니다.

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

1. **기본 암호화(Default encryption)** 섹션의 **버킷 키(Bucket Key)** 아래에 버킷의 S3 버킷 키 설정이 표시됩니다.

   S3 버킷 키 설정이 표시되지 않으면 사용자는 `s3:GetEncryptionConfiguration` 작업을 수행할 권한이 없을 수 있습니다. 자세한 내용은 *Amazon Simple Storage Service API Reference*의 [GetBucketEncryption](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)을 참조하십시오.

**객체에 대한 S3 버킷 키 설정 보기**

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

1. **버킷(Buckets)** 목록에서 S3 버킷 키를 사용 설정할 버킷을 선택합니다.

1. **객체(Objects)** 목록에서 사용자의 객체 이름을 선택합니다.

1. **세부 정보(Details)** 탭의 **서버 측 암호화 설정(Server-side encryption settings)**에서 **편집(Edit)**을 선택합니다.

   **버킷 키**에서 객체에 대한 S3 버킷 키 설정을 볼 수 있습니다. 이 설정은 편집할 수 없습니다.

## AWS CLI 사용
<a name="bucket-key-settings-cli"></a>

**버킷 수준의 S3 버킷 키 설정 반환**  
이 예제를 사용하려면 각 `user input placeholder`를 사용자의 정보로 대체합니다.

```
aws s3api get-bucket-encryption --bucket amzn-s3-demo-bucket1
```

자세한 내용은 **AWS CLI Command Reference의 [get-bucket-encryption](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/get-bucket-encryption.html)을 참조하십시오.

**객체 수준 S3 버킷 키 설정 반환**  
이 예제를 사용하려면 각 `user input placeholder`를 사용자의 정보로 대체합니다.

```
aws s3api head-object --bucket amzn-s3-demo-bucket1 --key my_images.tar.bz2
```

자세한 내용은 **AWS CLI Command Reference의 [head-object](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/head-object.html)를 참조하십시오.

## REST API 사용
<a name="bucket-key-settings-rest"></a>

**버킷 수준의 S3 버킷 키 설정 반환**  
S3 버킷 키 설정을 포함하여 버킷에 대한 암호화 정보를 반환하려면 `GetBucketEncryption` 작업을 사용합니다. S3 버킷 키 설정은 `BucketKeyEnabled` 설정과 함께 `ServerSideEncryptionConfiguration` 요소의 응답 본문에 반환됩니다. 자세한 내용은 *Amazon S3 API Reference*의 [GetBucketEncryption](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)을 참조하십시오.

**S3 버킷 키에 대한 객체 수준 설정 반환**  
객체에 대한 S3 버킷 키 상태를 반환하려면 `HeadObject` 작업을 사용합니다. `HeadObject`은(는) 객체에 대해 S3 버킷 키가 사용 설정되었는지 또는 사용 중지되었는지를 표시하는 `x-amz-server-side-encryption-bucket-key-enabled` 응답 헤더를 반환합니다. 자세한 내용은 *Amazon S3 API Reference*에서 [HeadObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html)를 참조하십시오.

객체에 대해 S3 버킷 키가 구성된 경우 다음 API 작업도 `x-amz-server-side-encryption-bucket-key-enabled` 응답 헤더를 반환합니다.
+ [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) 
+ [PostObject](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) 
+ [CopyObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) 
+ [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) 
+ [UploadPartCopy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) 
+ [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) 
+ [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) 
+ [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) 