AWS - Advanced SecurityYou want to allow an EC2 instance to use a KMS key for encryption without sharing the key material. What is the best way to achieve this?AAttach an IAM role to the EC2 instance with kms:Encrypt permission on the keyBEmbed the KMS key material in the EC2 instance user dataCStore the KMS key in the EC2 instance environment variablesDManually copy the key material to the EC2 instanceCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand secure key usageKMS keys are managed by AWS; key material should never be shared or copied.Step 2: Use IAM roles for permissionsAssigning an IAM role with kms:Encrypt permission allows EC2 to use the key securely.Final Answer:Attach an IAM role to the EC2 instance with kms:Encrypt permission on the key -> Option AQuick Check:Use IAM roles, not key material sharing [OK]Quick Trick: Use IAM roles to grant KMS permissions securely [OK]Common Mistakes:Sharing key material manuallyStoring keys in environment variables
Master "Advanced Security" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes Advanced Security - AWS WAF for web application firewall - Quiz 15hard Architecture Best Practices - Operational excellence pillar - Quiz 7medium Architecture Best Practices - Reliability pillar principles - Quiz 2easy Architecture Best Practices - Performance efficiency pillar - Quiz 3easy CloudFormation - Resources section - Quiz 9hard Cost Optimization - Reserved Instances and Savings Plans - Quiz 8hard Cost Optimization - Budgets and cost anomaly detection - Quiz 12easy EKS - EKS networking with VPC CNI - Quiz 5medium EKS - EKS networking with VPC CNI - Quiz 9hard Serverless Architecture - Lambda with DynamoDB Streams - Quiz 11easy