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.
Question 6
A company stores sensitive documents in S3. Security requires that all objects be encrypted with keys that the company controls, that key usage be logged, and that keys can be disabled immediately if needed. Which solution meets these requirements?
- Use SSE-KMS with a customer managed key and enable CloudTrail logging. — Correct
- Use SSE-KMS with the AWS managed key aws/s3 and enable CloudTrail data events for the bucket.
- Use client-side encryption with keys stored in an application configuration file on each server.
- Use SSE-S3 with Amazon S3 managed keys and enable S3 server access logging for every bucket.
Correct answer
Use SSE-KMS with a customer managed key and enable CloudTrail logging.
Explanation
Customer managed KMS keys can be disabled at any time, and every use is logged in CloudTrail. SSE-S3 keys are not controlled by the company. The AWS managed key cannot be disabled by the customer. Keys in configuration files are not centrally controlled or audited.
Question 7
A company wants to centrally manage permissions for its workforce across 40 AWS accounts by using its existing Microsoft Entra ID identities. Which solution meets this requirement?
- Use IAM Identity Center with Entra ID as the identity source and assign permission sets to groups. — Correct
- Use AWS Directory Service Simple AD in each account and sync users from Entra ID every night.
- Configure Amazon Cognito identity pools in each account to federate with Entra ID for console access.
- Create IAM users in each account with the same user names that employees use in Entra ID.
Correct answer
Use IAM Identity Center with Entra ID as the identity source and assign permission sets to groups.
Explanation
IAM Identity Center federates with external identity providers and manages access across accounts with permission sets. IAM users per account do not scale. Cognito is for application users. Simple AD does not provide multi-account access management.
Question 8
A company wants to give users temporary credentials to upload files directly to S3 from a mobile app after they sign in with Amazon Cognito. Which solution meets this requirement?
- Use a Cognito identity pool that maps authenticated users to an IAM role with scoped S3 permissions. — Correct
- Embed an IAM user's access keys in the mobile app and restrict the keys to the upload bucket.
- Use the Cognito user pool ID token directly as an S3 authorization header for uploads.
- Make the bucket publicly writable and validate the uploaded files with a Lambda function.
Correct answer
Use a Cognito identity pool that maps authenticated users to an IAM role with scoped S3 permissions.
Explanation
Identity pools exchange tokens for temporary AWS credentials through an IAM role. Embedded keys can be extracted. S3 does not accept Cognito tokens. A public write bucket allows abuse.
Question 9
A company has an application in a private subnet that must download software updates from the internet. The instances must not be reachable from the internet. Which solution meets these requirements?
- Add a NAT gateway in a public subnet and route the private subnet's internet traffic to it. — Correct
- Attach an internet gateway to the VPC and add a route to it in the private subnet's route table.
- Create an interface VPC endpoint for each software repository that the instances need to reach.
- Assign Elastic IP addresses to the instances and restrict their security groups to outbound traffic.
Correct answer
Add a NAT gateway in a public subnet and route the private subnet's internet traffic to it.
Explanation
A NAT gateway allows outbound internet access while blocking inbound connections. Routing to an internet gateway with public IPs makes instances internet-reachable. Interface endpoints exist only for AWS and PrivateLink services.
Question 10
A company's application uses Amazon S3 and must serve objects to users in a single country only, based on the user's location. The content is delivered through CloudFront. Which feature should be used?
- Route 53 latency-based routing
- CloudFront geographic restrictions — Correct
- AWS Global Accelerator endpoints
- S3 bucket policies with aws:SourceIp
Correct answer
CloudFront geographic restrictions
Explanation
CloudFront geo restriction allows or blocks viewers by country. IP lists are hard to maintain. Latency routing and Global Accelerator do not block countries.