AWS Certified SysOps Administrator – Associate (legacy) — Question 887
A company has two AWS accounts: development and production. All applications send logs to a specific Amazon S3 bucket for each account, and the Developers are requesting access to the production account S3 buckets to view the logs.
Which is the MOST efficient way to provide the Developers with access?
Answer options
- A. Create an AWS Lambda function with an IAM role attached to it that has access to both accounts' S3 buckets. Pull the logs from the production S3 bucket to the development S3 bucket.
- B. Create IAM users for each Developer on the production account, and add the Developers to an IAM group that provides read-only access to the S3 log bucket.
- C. Create an Amazon EC2 bastion host with an IAM role attached to it that has access to the production S3 log bucket, and then provision access for the Developers on the host.
- D. Create a resource-based policy for the S3 bucket on the production account that grants access to the development account, and then delegate access in the development account.
Correct answer: B
Explanation
Creating IAM users for the Developers directly in the production account and assigning them to a read-only IAM group (Option B) provides a direct and simple way to manage their access to the logs. Option A introduces unnecessary complexity and duplication costs by using AWS Lambda to copy logs between accounts. Option C is inefficient and adds management overhead by requiring an Amazon EC2 bastion host, while Option D involves complex cross-account delegation configuration.