A healthcare startup stores encrypted patient records in a private Amazon S3 bucket in its production AWS account. An internal compliance officer (an IAM user in the same account) requires read-only access to these records for auditing. Simultaneously, an automated diagnostic application running in an external partner's AWS account must upload new patient reports directly to the same bucket. The startup's security policy prohibits sharing credentials or setting up cross-account identity federation. Which of the following configurations represents the most secure, AWS-recommended approach to grant the required access?
- ACreate a new IAM user in the production AWS account for the external partner's application, generate static access keys, and share these credentials with the partner.
- BRely on AWS to automatically authorize the compliance officer and the partner's external application based on their IP addresses, as all access routing is managed by AWS under the Shared Responsibility Model.
- Attach an identity-based policy to the compliance officer's IAM user granting read access, and attach a resource-based policy (bucket policy) to the S3 bucket granting write access to the partner's external AWS account.Answer
- DGenerate access keys for the production AWS Account Root User and configure both the compliance officer and the partner's application to authenticate with them.
Answer
Attach an identity-based policy to the compliance officer's IAM user granting read access, and attach a resource-based policy (bucket policy) to the S3 bucket granting write access to the partner's external AWS account.
The correct answer is to attach an identity-based policy to the compliance officer's IAM user granting read access, and attach a resource-based policy (bucket policy) to the S3 bucket granting write access to the partner's external AWS account. Identity-based policies are optimal for managing access for users in the local account, while resource-based bucket policies are the most secure way to grant cross-account permissions directly without requiring the creation of local IAM users, the sharing of credentials, or the setup of full cross-account role assumption.
Step-by-Step Solution
Key Concept
Distinction between identity-based policies (attached to users/groups/roles) and resource-based policies (attached to resources like S3 buckets) for cross-account access.
Estimated Time:2m 0s