- Newest
- Most votes
- Most comments
As far as I understand the issue is that Apache Iceberg requires s3:PutObject permissions even for DELETE operations, this is because Iceberg must write new metadata files and "delete files" to the bucket to track changes.
The Root Cause:
In AWS, an Explicit Deny in a resource-based policy (Bucket Policy) always overrides any Allow in an identity-based policy (IAM Role). Even if your Lambda has AdministratorAccess, it will be blocked by a Deny statement in the bucket owner's policy.
Try the following Since you cannot modify the policy yourself, you must ask the bucket owners to add an exception for your Lambda's IAM Role.
- Identify the Deny Block: Look for a statement in the Bucket Policy with
"Effect": "Deny"and"Action": "s3:PutObject". - Add an Exception: The owners should add a
Conditionto that Deny block to exclude your role.
Example Policy Fix:
{ "Effect": "Deny", "Action": "s3:PutObject", "Resource": "arn:aws:s3:::target-bucket-name/*", "Condition": { "StringNotLike": { "aws:PrincipalArn": [ "arn:aws:iam::your-account-id:role/your-lambda-role-name" ] } } }
Note: If the Deny is based on Encryption requirements (e.g., requiring a specific KMS key), ensure your Athena/Lambda configuration is set to use that specific key when writing results. However, usually, a cross-team "explicit deny" is a structural boundary that only a policy update can resolve.
Relevant content
- asked 7 months ago
- asked a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 7 months ago
