Q80. AMI 공유의 안전한 방법

AWS 자격증을 준비하는 여러분, 안녕하세요. 오늘은 AWS Certified Solutions Architect - Associate 자격증 시험에 자주 출제되는 주제 중 하나인 Amazon Machine Image(AMI) 공유에 대해 알아보겠습니다. 특히 암호화된 AMI를 외부 파트너와 안전하게 공유하는 방법에 대해 자세히 살펴보겠습니다.

문제 상황

Q1:
한 회사가 최근 애플리케이션 마이그레이션 이니셔티브를 지원하기 위해 AWS 관리형 서비스 공급자(MSP) 파트너와 계약을 체결했습니다. 솔루션 설계자는 기존 AWS 계정의 Amazon 머신 이미지(AMI)를 MSP 파트너의 AWS 계정과 공유해야 합니다. 이 AMI는 Amazon Elastic Block Store(Amazon EBS)의 지원을 받으며, AWS Key Management Service(AWS KMS) 고객 관리형 키를 사용하여 EBS 볼륨 스냅샷을 암호화합니다.

솔루션 설계자가 MSP 파트너의 AWS 계정과 AMI를 공유하는 가장 안전한 방법은 무엇입니까?

<small>A company recently contracted with an AWS Managed Service Provider (MSP) partner to support an application migration initiative. A solutions architect needs to share Amazon Machine Images (AMIs) from an existing AWS account with the MSP partner's AWS account. The AMIs are backed by Amazon Elastic Block Store (Amazon EBS) and use an AWS Key Management Service (AWS KMS) customer managed key to encrypt the EBS volume snapshots.

What is the MOST secure way for the solutions architect to share the AMIs with the MSP partner's AWS account?</small>

선택지

A. 암호화된 AMI 및 스냅샷을 공개적으로 사용할 수 있도록 합니다. MSP 파트너의 AWS 계정이 키를 사용할 수 있도록 키 정책을 수정합니다.
<small>Make the encrypted AMIs and snapshots publicly available. Modify the key policy to allow the MSP partner's AWS account to use the key.</small>

B. AMI의 launchPermission 속성을 수정합니다. MSP 파트너의 AWS 계정과만 AMI를 공유하십시오. MSP 파트너의 AWS 계정이 키를 사용할 수 있도록 키 정책을 수정합니다.
<small>Modify the launchPermission attribute of the AMIs. Share the AMIs with only the MSP partner's AWS account. Modify the key policy to allow the MSP partner's AWS account to use the key.</small>

C. AMI의 launchPermission 속성을 수정합니다. MSP 파트너의 AWS 계정과만 AMI를 공유하십시오. 암호화를 위해 MSP 파트너가 소유한 새 KMS 키를 신뢰하도록 키 정책을 수정합니다.
<small>Modify the launchPermission attribute of the AMIs. Share the AMIs with only the MSP partner's AWS account. Modify the key policy to trust a new KMS key that is owned by the MSP partner for encryption.</small>

D. 원본 계정에서 MSP 파트너의 AWS 계정에 있는 Amazon S3 버킷으로 AMI를 내보내고 MSP 파트너가 소유한 새 KMS 키로 S3 버킷을 암호화합니다. MSP 파트너의 AWS 계정에서 AMI를 복사하고 시작합니다.
<small>Export the AMIs from the source account to an Amazon S3 bucket in the MSP partner's AWS account, and encrypt the S3 bucket with a new KMS key that is owned by the MSP partner. Copy and launch the AMIs in the MSP partner's AWS account.</small>

정답 및 해설

정답은 B입니다.

AMI를 안전하게 공유하는 가장 좋은 방법은 AMI의 launchPermission 속성을 수정하여 특정 AWS 계정(이 경우 MSP 파트너의 계정)과만 공유하는 것입니다. 또한, 암호화에 사용된 KMS 키의 정책을 수정하여 MSP 파트너의 계정이 해당 키를 사용할 수 있도록 허용해야 합니다.

이 방법은 다음과 같은 이유로 가장 안전합니다:

  1. AMI를 공개적으로 공유하지 않고 특정 계정과만 공유하므로 보안이 강화됩니다.
  2. 기존의 KMS 키를 계속 사용하면서 MSP 파트너에게 필요한 권한만 부여할 수 있습니다.
  3. AMI와 관련된 암호화 키의 제어권을 유지할 수 있습니다.

AWS 공식 문서에 따르면, 암호화된 AMI를 공유할 때는 AMI를 암호화하는 데 사용된 고객 관리형 CMK도 공유해야 합니다. 이를 위해 키 정책에 외부 계정의 권한을 추가해야 합니다.

<small>The correct answer is B.

The most secure way to share AMIs is to modify the launchPermission attribute of the AMIs to share them only with the specific AWS account (in this case, the MSP partner's account). Additionally, you need to modify the policy of the KMS key used for encryption to allow the MSP partner's account to use the key.

This method is the most secure for the following reasons:

  1. It doesn't make the AMIs publicly available, enhancing security by sharing only with the intended account.
  2. It continues to use the existing KMS key while granting only the necessary permissions to the MSP partner.
  3. It maintains control over the encryption key associated with the AMIs.

According to AWS documentation, when sharing an encrypted AMI, you must also share the customer managed CMK used to encrypt it. This is done by adding permissions for the external account to the key policy.</small>

오답 설명

A. 암호화된 AMI와 스냅샷을 공개적으로 사용 가능하게 만드는 것은 심각한 보안 위험을 초래할 수 있습니다. 이는 민감한 정보가 노출될 수 있는 가능성을 크게 높입니다.

<small>A. Making encrypted AMIs and snapshots publicly available poses a significant security risk. This greatly increases the possibility of sensitive information being exposed.</small>

C. MSP 파트너가 소유한 새로운 KMS 키를 신뢰하도록 키 정책을 수정하는 것은 불필요하며 잠재적으로 위험할 수 있습니다. 기존 키를 계속 사용하면서 필요한 권한만 부여하는 것이 더 안전합니다.

<small>C. Modifying the key policy to trust a new KMS key owned by the MSP partner is unnecessary and potentially risky. It's safer to continue using the existing key while granting only the necessary permissions.</small>

D. AMI를 S3 버킷으로 내보내고 MSP 파트너의 새 KMS 키로 암호화하는 것은 복잡하고 불필요한 과정입니다. 또한, 원본 AMI에 대한 제어권을 잃을 수 있습니다.

<small>D. Exporting the AMIs to an S3 bucket and encrypting with a new KMS key owned by the MSP partner is a complex and unnecessary process. It also risks losing control over the original AMIs.</small>

결론

이 문제는 AWS에서 암호화된 리소스를 안전하게 공유하는 방법에 대한 이해를 테스트합니다. 핵심은 필요한 최소한의 권한만을 부여하면서 보안을 유지하는 것입니다. AMI를 특정 계정과만 공유하고, 관련 KMS 키에 대한 사용 권한을 부여하는 것이 가장 안전한 접근 방식입니다. 이는 AWS의 최소 권한 원칙을 잘 보여주는 예시입니다.

<small>This question tests understanding of how to securely share encrypted resources in AWS. The key is to maintain security while granting only the minimum necessary permissions. Sharing the AMI with only the specific account and granting usage permissions for the related KMS key is the most secure approach. This exemplifies AWS's principle of least privilege.</small>

원본 문제 링크

댓글

이 블로그의 인기 게시물

Anaconda-Python 환경 VSCode에서 사용하기

Windows Git 설치 및 GitHub 활용 방법