Question 1
A company must restrict SSH access to EC2 instances for auditing reasons and record every command that administrators run. Which solution meets these requirements?
- Keep SSH open from the corporate IP range, and enable VPC flow logs to record the commands that administrators run.
- Use Systems Manager Session Manager with session logging to S3 or CloudWatch Logs, and remove inbound SSH rules. — Correct
- Use a bastion host with SSH keys shared by the team and enable detailed monitoring on the bastion.
- Use EC2 Instance Connect with SSH open to 0.0.0.0/0 and enable CloudTrail for the instance commands.
Correct answer
Use Systems Manager Session Manager with session logging to S3 or CloudWatch Logs, and remove inbound SSH rules.
Explanation
Session Manager removes the need for inbound SSH and can log session activity. Flow logs record network metadata, not commands. CloudTrail does not record commands inside an SSH session. Shared keys are not auditable per person.
Question 2
A team must ensure that every EBS volume created in an account is encrypted, including volumes created by Auto Scaling groups and by services that call the EC2 API. Which solution provides this with the LEAST effort?
- Enable EBS encryption by default in each Region of the account and choose a default KMS key. — Correct
- Create an SCP that denies ec2:CreateVolume for every principal in the account and Region.
- Create an AWS Config rule that deletes unencrypted volumes as soon as they are created in the account.
- Add an encryption setting to every launch template and CloudFormation template in the account.
Correct answer
Enable EBS encryption by default in each Region of the account and choose a default KMS key.
Explanation
Encryption by default applies to all new volumes in the Region automatically. Updating every template is manual and easy to miss. Deleting volumes breaks workloads. Denying CreateVolume blocks all volume creation.
Question 3
A CloudOps engineer must audit whether each EC2 instance's security groups have changed over the last 6 months, including who made each change. Which combination provides this information? (Choose TWO.)
- AWS Config configuration history for the security groups. — Correct
- AWS CloudTrail records of the security group API calls. — Correct
- CloudWatch metrics for the instances' network traffic.
- VPC flow logs for the instances' network interfaces.
- Amazon Inspector network reachability findings.
Correct answer
AWS Config configuration history for the security groups.; AWS CloudTrail records of the security group API calls.
Explanation
Config shows what each configuration looked like over time, and CloudTrail shows who made each API call. Flow logs, Inspector, and metrics do not record configuration history or callers.
Question 4
Partner accounts upload objects to a company's S3 bucket. The bucket owner cannot read some of the uploaded objects and receives Access Denied errors. Bucket policies allow the uploads. What should the CloudOps engineer do?
- Enable S3 Block Public Access on the bucket so that uploaded objects become private to the bucket owner and readable by the owner's account.
- Add a lifecycle rule that copies each uploaded object to a second bucket owned by the company each night.
- Enable default encryption with SSE-S3 on the bucket so that the bucket owner can decrypt and read the objects uploaded by partner accounts.
- Set S3 Object Ownership on the bucket to Bucket owner enforced so that ACLs are disabled and the bucket owner owns all new objects. — Correct
Correct answer
Set S3 Object Ownership on the bucket to Bucket owner enforced so that ACLs are disabled and the bucket owner owns all new objects.
Explanation
With ACLs enabled, objects uploaded by other accounts can be owned by the uploader. Bucket owner enforced disables ACLs and makes the bucket owner the owner of all new objects. Block Public Access does not change ownership. Copies add cost. Encryption is unrelated.
Question 5
A company must investigate a security incident on an EC2 instance. Before making any changes, the team must preserve evidence from the instance. Which actions should the CloudOps engineer take? (Choose TWO.)
- Create EBS snapshots of all volumes attached to the instance. — Correct
- Terminate the instance immediately to stop the attacker from continuing.
- Delete the instance's CloudWatch Logs so that the attacker cannot read them.
- Reboot the instance to clear any malicious processes from memory.
- Capture the instance's memory with a forensic tool before isolation steps that could reboot it. — Correct
Correct answer
Create EBS snapshots of all volumes attached to the instance.; Capture the instance's memory with a forensic tool before isolation steps that could reboot it.
Explanation
Snapshots preserve disk evidence, and a memory capture preserves volatile data. Terminating, rebooting, or deleting logs destroys evidence.
Question 6
A security team requires that all data in an Amazon RDS for PostgreSQL database be encrypted in transit between the application and the database. Which configuration enforces this on the database side?
- Put the database in a private subnet and remove its public accessibility setting.
- Enable encryption at rest with a KMS key on the DB instance, and reboot the instance to apply it.
- Set the rds.force_ssl parameter to 1 in the DB parameter group and apply it to the instance. — Correct
- Enable IAM database authentication and require IAM tokens for every connection.
Correct answer
Set the rds.force_ssl parameter to 1 in the DB parameter group and apply it to the instance.
Explanation
rds.force_ssl requires SSL/TLS for all connections. Encryption at rest does not protect data in transit. Network isolation is not encryption. IAM authentication requires SSL for those connections but does not force SSL for all users.
Question 7
A security analyst needs to search a year of CloudTrail management events that a trail delivers to an S3 bucket, using SQL, without loading the data into a database. Which solution meets this requirement with the LEAST effort?
- Send the trail to CloudWatch Logs and use Logs Insights on the S3 files that are already delivered.
- Create an Amazon Athena table over the CloudTrail logs in S3 and query it with SQL. — Correct
- Use the CloudTrail Event history page in the console, which shows a year of management events.
- Download the log files from the bucket and import them into an Amazon RDS database for querying.
Correct answer
Create an Amazon Athena table over the CloudTrail logs in S3 and query it with SQL.
Explanation
Athena queries the CloudTrail files in place with SQL. Loading data into RDS adds work. Event history covers only the last 90 days. Sending to CloudWatch Logs affects only new events, not files already in S3.
Question 8
A company runs a public-facing application that has suffered large DDoS attacks. The company wants 24/7 access to the AWS DDoS response team and protection against scaling charges caused by attacks. Which service should the company use?
- AWS Shield Advanced — Correct
- AWS WAF managed rules
- AWS Shield Standard
- Amazon GuardDuty
Correct answer
AWS Shield Advanced
Explanation
Shield Advanced includes the Shield Response Team and cost protection for scaling during attacks. Shield Standard is automatic but has neither. WAF managed rules filter application requests. GuardDuty detects threats.
Question 9
A security engineer scheduled a KMS key for deletion with a 30-day waiting period. Two days later, the team realizes that some data encrypted with the key may still be needed. What should the CloudOps engineer do?
- Cancel the key deletion during the waiting period, which returns the key to the disabled state, and then enable the key. — Correct
- Wait for the deletion to complete, and then restore the key from the automatic KMS key backup that is kept in the same Region.
- Enable automatic key rotation on the key so that KMS keeps the old key material after the key is deleted.
- Create a new KMS key with the same alias so that the existing ciphertext can be decrypted with the new key.
Correct answer
Cancel the key deletion during the waiting period, which returns the key to the disabled state, and then enable the key.
Explanation
A key scheduled for deletion can be recovered by canceling the deletion during the waiting period. After deletion, the key cannot be restored. A new key cannot decrypt the old data. Rotation does not stop deletion.
Question 10
A CloudOps engineer needs to grant an external auditor temporary read-only access to AWS Config and CloudTrail data in one account for 2 weeks. The auditor has their own AWS account. What is the MOST secure solution?
- Make the CloudTrail S3 bucket public for 2 weeks so that the auditor can download the logs.
- Share the account's root user credentials with the auditor and change them after 2 weeks.
- Create an IAM role with read-only permissions that trusts the auditor's account, and remove the role after 2 weeks. — Correct
- Create an IAM user with read-only permissions for the auditor, and send the user's access keys to the auditor by email.
Correct answer
Create an IAM role with read-only permissions that trusts the auditor's account, and remove the role after 2 weeks.
Explanation
A cross-account role grants temporary credentials and can be removed when the audit ends. Long-term keys and root credentials are unsafe. A public bucket exposes logs to everyone.