S3 MFA-Delete

MFA(multi factor authentication) forces user to generate a code on a device (mobile phone or hardware) before doing important operations on S3

-To use MFA-Delete, enable Versioning on the S3 bucket

-You will need MFA to

permanently delete an object version

suspend versioning on the bucket

-You won't need MFA for

enabling versioning

listing deleted versions

Only the bucket owner(root account) can enable/disable MFA-Delete

MFA-Delete currently can only be enabled using the CLI

S3에서 중요한 작업 전 MFA 인증(주로 핸드폰 혹은 하드웨어 장치)이 이루어진다.

MFA 삭제를 사용하려면 S3버킷에서 버저닝을 활성화 해야한다.

MFA가 필요한 경우 : 객체의 버전을 영구적으로 삭제할 때 / 버킷에서 버저닝을 중단하는 경우이다.

MFA가 필요없는 경우 : 버저닝 활성화 할 때 / 삭제된 버전을 목록화 할 때.

오직 루트 계정으로만 MFA-Delete를 활성화/비활성화 할 수 있다.

현재 CLI를 통해서만 MFA삭제가 가능하다.


S3 Default Encryption vs Bucket Policies

One way to "force encryption" is to use a bucket policy and refuse any API call to PUT an S3 object without encryption headers

Another way is to use the "default encrypton" option in S3

Note: Bucket Policies are evaluated before "default encryption"

버킷 정책을 사용해 강제로 객체를 암호화 할 수 있다.

"암호화를 강제"하는 한 가지 방법은 버킷 정책을 사용하고 암호화 헤더가 없는 S3 개체에 대한 API 호출을 거부하는 것이다.

다른 방법으로는 S3의 기본 암호화 옵션을 사용하는 것이다.

일반 객체를 S3에 올리면 기본 암호화 옵션을 통해 암호화가 이루어진다.

참고: 버킷 정책 방식이 기본 암호화보다 먼저 고려된다.


S3 Access Logs

For audit purpose, you may want to log all access to S3 buckets

Any request made to S3, from any account, authorized or denied, will be logged into another S3 bucket

That data can be analyzed using data analysis tools...

Or Amazon Athena

S3 액세스 로그

감사 목적으로 모든 액세스를 S3 버킷에 로깅하는 경우, S3로 보내지는 모든 요청은 계정과 승인 여부에 상관없이, 다른 S3 버킷에

로깅되어 이후 분석이 가능하다.

데이터 분석도구나 Athena를 사용해 분석할 수 있다.

S3 Access Logs:Warning

Do not set your logging bucket to be the monitored bucket

It will create a logging loop, and your bucket will grow in size exponentially

모니터링 중인 버킷을 로깅 버킷으로 설정하면 안된다.

그렇게 설정할 시 로깅 루프가 생기게 되고, 버킷의 크기가 기하급수적으로 커진다. (엄청 많은 비용을 AWS에 지불할 수도 있다.)

+ Recent posts