Soru

Zorluk: OrtaIdentity and Access Management (IAM)

A company has a development workload running in AWS Account A. Developers assume an IAM role named `DeveloperRole` in Account A to perform their tasks. The solutions architect needs to grant these developers access to an Amazon S3 bucket named `prod-data-archive` located in AWS Account B. The access must be restricted to requests originating from the corporate office IP range (198.51.100.0/22198.51.100.0/22). Which combination of actions should the solutions architect take to meet these requirements? (Select TWO.)

  1. In Account A, attach a policy to the `DeveloperRole` that allows the `s3:GetObject` and `s3:ListBucket` actions on the `prod-data-archive` bucket.Cevap
  2. In Account B, attach a bucket policy to the `prod-data-archive` bucket that grants the `s3:GetObject` and `s3:ListBucket` permissions to the `DeveloperRole` in Account A, with a condition that restricts access to the source IP range 198.51.100.0/22198.51.100.0/22.Cevap
  3. C
    In Account B, create individual IAM users with long-term access keys for each developer in Account A, and attach a policy allowing access to the `prod-data-archive` bucket.
  4. D
    In Account B, use the AWS account root user to generate a pre-signed URL for the `prod-data-archive` bucket and share it with the developers.
  5. E
    In Account B, configure a Network ACL on the subnet containing the S3 bucket to restrict inbound traffic to the corporate IP range 198.51.100.0/22198.51.100.0/22.

Cevap

Attaching an IAM policy to the role in the source account to allow access to the bucket, and attaching a bucket policy in the destination account that grants access to that role under a condition restricting requests to the corporate IP range.
For cross-account S3 access, permissions must be enabled on both sides: the IAM role policy in the source account must allow outbound access to the bucket, and the S3 bucket policy in the destination account must allow inbound access from the role. The S3 bucket policy can use the `aws:SourceIp` condition to enforce that requests originate only from the corporate IP range.

Adım Adım Çözüm

1
Configure the identity-based policy in the source account.
The IAM role `DeveloperRole` in Account A is granted permissions to call S3 actions on the external bucket.
IAM identity policies govern outbound permissions from a principal.
2
Configure the resource-based policy in the destination account.
The S3 bucket policy in Account B is updated to allow the ARN of the IAM role from Account A.
Resource policies govern inbound access to a resource from external accounts.
3
Apply source network constraints to the resource policy.
A condition block checking `aws:SourceIp` against 198.51.100.0/22198.51.100.0/22 is added to the bucket policy.
This restricts bucket access exclusively to requests originating from the corporate network.

Anahtar Kavram

Cross-account access to Amazon S3 requires permissions to be granted both on the IAM identity in the source account and on the S3 bucket policy in the target account.
Bu soruyu puanla