AWS Certified Security – Specialty — Question 90
A company uses user data scripts that contain sensitive information to bootstrap Amazon EC2 instances. A Security Engineer discovers that this sensitive information is viewable by people who should not have access to it.
What is the MOST secure way to protect the sensitive information used to bootstrap the instances?
Answer options
- A. Store the scripts in the AMI and encrypt the sensitive data using AWS KMS Use the instance role profile to control access to the KMS keys needed to decrypt the data.
- B. Store the sensitive data in AWS Systems Manager Parameter Store using the encrypted string parameter and assign the GetParameters permission to the EC2 instance role.
- C. Externalize the bootstrap scripts in Amazon S3 and encrypt them using AWS KMS. Remove the scripts from the instance and clear the logs after the instance is configured.
- D. Block user access of the EC2 instance's metadata service using IAM policies. Remove all scripts and clear the logs after execution.
Correct answer: B
Explanation
The correct answer is B because using AWS Systems Manager Parameter Store to store sensitive data as an encrypted string ensures that only authorized EC2 instance roles can access it, maintaining security. Option A is less secure since storing scripts in the AMI exposes them to anyone with access to the AMI. Option C involves moving scripts to S3, which can still be accessed by unauthorized users if not correctly configured. Option D does not address the root issue of sensitive data exposure and focuses on metadata access instead.