A security engineer needs to grant a third-party vendor temporary access to an S3 bucket in the company's AWS account. The vendor has its own AWS account and will use its own IAM users. The engineer wants to avoid creating IAM users in the company's account and wants to audit all access. Which solution meets these requirements?
This is the standard cross-account access pattern. The role's trust policy specifies the vendor's account as the principal, allowing its IAM users to assume the role via STS. The permissions policy grants S3 access. No IAM users are created in the company account, and all access is audited through CloudTrail, which logs AssumeRole and S3 API calls. This meets all requirements.
Why this answer
Cross-account access is best achieved by creating an IAM role in the trusting account that the trusted account can assume. The trust policy names the vendor's account, and the permissions policy grants S3 access. This avoids creating IAM users in the company account and ensures all actions are logged in CloudTrail.
Other options either violate security best practices or use unsupported features.
Exam trap
The trap here is assuming that AWS RAM can share S3 buckets, when it cannot, or that creating IAM users is acceptable despite the explicit requirement to avoid them.