AWS Certified Solutions Architect – Professional — Question 314
An AWS partner company is building a service in AWS Organizations using its organization named org1. This service requires the partner company to have access to AWS resources in a customer account, which is in a separate organization named org2. The company must establish least privilege security access using an API or command line tool to the customer account.
What is the MOST secure way to allow org1 to access resources in org2?
Answer options
- A. The customer should provide the partner company with their AWS account access keys to log in and perform the required tasks.
- B. The customer should create an IAM user and assign the required permissions to the IAM user. The customer should then provide the credentials to the partner company to log in and perform the required tasks.
- C. The customer should create an IAM role and assign the required permissions to the IAM role. The partner company should then use the IAM role's Amazon Resource Name (ARN) when requesting access to perform the required tasks.
- D. The customer should create an IAM role and assign the required permissions to the IAM role. The partner company should then use the IAM role's Amazon Resource Name (ARN), including the external ID in the IAM role's trust policy, when requesting access to perform the required tasks.
Correct answer: D
Explanation
Option D is the most secure method because using an IAM role for cross-account access avoids sharing long-term credentials, which eliminates the security risks associated with Options A and B. Furthermore, requiring an external ID in the IAM role's trust policy is an AWS best practice that prevents the 'confused deputy' problem in multi-tenant or third-party integrations. Option C is less secure because it lacks this critical external ID verification.