-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(s3-deployment): apply least privilege to destination bucket policies #35663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(s3-deployment): apply least privilege to destination bucket policies #35663
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
a4fd28a
to
f17cf5b
Compare
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
2 similar comments
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
Introduction
This change improves security by scoping IAM policies to the specific
destination key prefix instead of granting access to all bucket objects.
Changes:
/<destinationKeyPrefix>/*
instead of/*
destinationKeyPrefix
is specified (e.g., 'deploy/here/', 'efs/'),the Lambda execution role only receives permissions for that specific prefix
/*
accessSecurity Benefits:
Affected Use Cases:
✅ Deployment with prefix:
destinationKeyPrefix: 'deploy/here/'
✅ EFS-backed deployment:
destinationKeyPrefix: 'efs/', useEfs: true
✅ Multiple deployments to same bucket with different prefixes
✅ Deployments without prefix (unchanged behavior)
Testing:
Fixes #35610