Sample questions with answers and explanations
Question 1
A company processes sensitive data and must ensure that EC2 instances never use Instance Metadata Service Version 1. Which configuration enforces this for new instances in an organization?
- A security group rule that blocks traffic to the metadata IP address.
- An IAM policy that allows only t3 instance types to be launched by users.
- A CloudWatch alarm that notifies when an instance uses IMDSv1.
- An SCP that denies ec2:RunInstances unless ec2:MetadataHttpTokens is required. — Correct
Correct answer
An SCP that denies ec2:RunInstances unless ec2:MetadataHttpTokens is required.
Explanation
An SCP condition on MetadataHttpTokens blocks launches without IMDSv2. Instance type limits are unrelated. Security groups do not filter IMDS traffic. Alarms only notify.
Question 2
A company must keep data in an Amazon RDS database encrypted at rest. The existing database is unencrypted. What is the correct way to encrypt it?
- Create a snapshot, copy the snapshot with encryption enabled, and restore a new DB instance from the encrypted copy. — Correct
- Modify the running DB instance and enable encryption at rest with a KMS key during the next maintenance window.
- Create an encrypted read replica of the unencrypted DB instance and promote the replica to a standalone instance.
- Enable encryption on the underlying EBS volumes of the DB instance from the EC2 console.
Correct answer
Create a snapshot, copy the snapshot with encryption enabled, and restore a new DB instance from the encrypted copy.
Explanation
An unencrypted RDS instance cannot be encrypted in place; the encrypted snapshot copy and restore is the supported method. You cannot access RDS volumes in EC2. You cannot create an encrypted read replica of an unencrypted instance.
Question 3
A company wants to identify S3 buckets that contain personally identifiable information across its organization. Which service should be used?
- Amazon Macie — Correct
- AWS Audit Manager
- AWS Security Hub
- Amazon GuardDuty
Correct answer
Amazon Macie
Explanation
Macie discovers sensitive data such as PII in S3. GuardDuty detects threats. Security Hub aggregates findings. Audit Manager collects audit evidence.
Question 4
A company hosts a static website in S3 and wants HTTPS with a custom domain name. Which solution meets these requirements?
- Use CloudFront with the S3 bucket as the origin, an ACM certificate in us-east-1, and a Route 53 alias record. — Correct
- Enable HTTPS on the S3 static website endpoint by uploading the certificate to the bucket's properties.
- Create an Application Load Balancer with the S3 bucket as a target group and an ACM certificate.
- Use Route 53 with an HTTPS record that points directly to the S3 static website endpoint.
Correct answer
Use CloudFront with the S3 bucket as the origin, an ACM certificate in us-east-1, and a Route 53 alias record.
Explanation
S3 website endpoints do not support HTTPS, so CloudFront with an ACM certificate (in us-east-1) provides it. S3 buckets cannot hold TLS certificates. ALB targets cannot be S3 buckets. DNS records do not add HTTPS.
Question 5
An application on EC2 instances needs to read objects from an S3 bucket in the same Region. The company wants traffic to stay on the AWS network and avoid NAT gateway data processing charges. What should a solutions architect do?
- Create a VPC peering connection between the VPC and the S3 service VPC in the same Region.
- Enable S3 Transfer Acceleration on the bucket and use the accelerated endpoint in the application.
- Create an S3 interface VPC endpoint in each subnet and keep the NAT gateway route for S3 traffic.
- Create an S3 gateway VPC endpoint and add it to the route tables of the instances' subnets. — Correct
Correct answer
Create an S3 gateway VPC endpoint and add it to the route tables of the instances' subnets.
Explanation
Gateway endpoints for S3 are free and keep traffic on the AWS network. Interface endpoints have charges, and keeping the NAT route does not change the path. Transfer Acceleration uses edge locations and the internet. You cannot peer with the S3 service.