A company is hiring an external consulting firm to perform a compliance audit of data stored in an Amazon S3 bucket. The consulting firm has its own AWS account. The solutions architect must grant the consultants read-only access to the S3 bucket for the duration of the audit. The security team specifies that no long-term IAM credentials or new IAM users can be created, and the consultants must access the resources securely using temporary credentials. Which solution should the solutions architect implement to meet these requirements?
- AGenerate access keys for the company's AWS account root user, and share them securely with the lead auditor of the consulting firm to perform the necessary audit tasks.
- Create an IAM role in the company's AWS account with a trust policy that allows the consulting firm's AWS account to assume the role. Attach an IAM policy to the role that grants read-only permissions to the S3 bucket. Instruct the consultants to assume this role using AWS Security Token Service (AWS STS).Cevap
- CCreate individual IAM users in the company's AWS account for each consultant from the firm. Attach a read-only S3 permission policy to each user and generate access keys for them to use during the audit.
- DStore the credentials of an administrative IAM user in AWS Systems Manager Parameter Store as a plaintext String parameter, and configure a public parameter policy allowing the consultants to retrieve it.
Cevap
Create an IAM role in the company's AWS account with a trust policy that allows the consulting firm's AWS account to assume the role, attaching a read-only S3 policy, and having the consultants assume the role using AWS STS.
The correct answer is correct because defining an IAM role with a trust policy that trusts the external consulting firm's AWS account allows the consultants to assume the role via AWS STS. This gives them temporary security credentials to access the target Amazon S3 bucket, meeting the security criteria of avoiding long-term access keys or the creation of local IAM users.
Adım Adım Çözüm
Anahtar Kavram
Cross-Account IAM Roles and AWS STS Federation