Noob question about KMS and EC2

0

Why my EC2 instances are able to start, using an encrypted root volume (with a CMK), if the EC2 instance does not have any role attached?

  • I created an EC2 instance, and stop it
  • I created a snapshot from the root volume
  • Then I created a new encrypted volume from the snapshot, using a CMK which only allows one specific role for cryptographic operations
  • Then I detached the unencrypted volume, and attached the encrypted volume as root for the EC2 instance (xvda)
  • After starting again the EC2, everything worked fine, why?

Thanks.

질문됨 일 년 전209회 조회
2개 답변
1

From How EBS encryption works when the snapshot is encrypted

When you attach the encrypted volume to an instance, Amazon EC2 sends a CreateGrant request to AWS KMS so that it can decrypt the data key.
profile pictureAWS
전문가
kentrad
답변함 일 년 전
0

You are invoking "StartInstances" API with your IAM user or Role which has enough privileges on KMS which is the reason EC2 instance is starting all the time with encrypted volumes. If your user ID or Role does not have access to KMS then Ec2 instance will not launch and Ec2 running status will change from Pending to Stopped state every time after starting instance.

AWS
Ajay
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠