A Lambda function cannot read an S3 bucket in another account even though the bucket policy allows the role. Why?
IntermediateScenarioIAM, Organizations and Multi-Account
Answer
Situation read → Cross-account S3 access requires the identity policy in the caller account and the bucket policy to both allow, and KMS if the objects are encrypted.
What I'd do →
- Confirm the Lambda execution role has
s3:GetObjecton the bucket ARN and object path - Confirm the bucket policy principal is the role ARN, not just the account root
- If SSE-KMS, check the key policy and the role's
kms:Decrypton that key - Check the bucket for Block Public Access or a VPC endpoint policy denying the call
Why → Missing KMS permission produces an AccessDenied that looks identical to a missing S3 permission, which wastes hours.
Interview tip → Always ask "is the object KMS-encrypted?" first in cross-account S3 problems.
More on IAM, Organizations and Multi-Account
A developer needs read-only access to one S3 bucket from their laptop. How do you grant it without creating long-lived access keys?BeginnerAn EC2 application needs to write to DynamoDB. Where do the credentials come from?BeginnerSecurity wants to know who deleted a production S3 bucket yesterday. How do you find out?BeginnerYou must stop anyone in a member account from disabling CloudTrail, even account admins. What do you use?BeginnerA cross-account role assumption fails with AccessDenied even though the target role trusts the source account. What do you check?IntermediateDesign access for a CI pipeline in GitHub Actions to deploy to AWS without storing AWS keys in GitHub.Intermediate