You need cross-account access to an S3 bucket for a data processing role in another AWS account. The external account must be able to read only objects under a specific prefix. Which approach provides least privilege while remaining maintainable?

Answer

Attach a bucket policy in the owning account that allows s3:GetObject to the external role ARN for the required prefix, and ensure the external role uses an IAM policy scoped to that same prefix

Explanation

A bucket policy is required because S3 authorization evaluates the bucket policy in addition to the caller’s IAM permissions. Scoping both policies to the prefix enforces least privilege and reduces accidental overbroad access.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error

Related questions

A media platform stores original uploads in S3 and generates derivative videos. Regulatory policy requires auditability of transformations and that derivatives are only created from originals. Which design best enforces this constraint?

View question →

A developer wants to replace NAT Gateway usage for a VPC private subnet. The subnet must access the internet for outbound HTTPS only. Instances should retain private IPs and avoid inbound exposure. Which solution best meets these needs?

View question →

A SaaS application runs behind an Application Load Balancer. The service stores idempotency keys in DynamoDB to avoid duplicate processing. You need exactly-once processing semantics from the client’s perspective during retries, while still supporting high throughput. Which DynamoDB strategy best supports this?

View question →

A company must migrate a stateful, on-prem application to AWS with minimal downtime. The target must support blue/green releases and preserve session continuity across instances. Which combination best satisfies these requirements?

View question →

Your architecture uses RDS Multi-AZ and a read replica. A failover event occurs, and the application must automatically redirect read traffic to the new primary or an appropriate replica. What is the most reliable way to handle the change for clients?

View question →

A VPC contains multiple isolated workloads. You must prevent lateral movement while still allowing controlled cross-workload communication over specific ports. Which network pattern best implements security with minimal operational overhead?

View question →

QuestionBack to list