You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with an S3 bucket (sst.aws.Bucket) that I'd like to add server-side encryption to with a customer managed key. As part of that work, I want to require KMS encryption on all objects in the bucket based on this documentation from AWS.
Because the SST S3 creates a policy automatically and buckets cannot have more than one policy I tried to use transforms to adjust the policy. However, the policy transform does not have access to the bucket's ARN, which I need.
Ideas
Update the transform to have reference to the bucket so I can interpolate the arn (like you do here).
Add an optional policy statements field to BucketCorsArgs that can be pushed to the internal statements array before creating the policy document.
The text was updated successfully, but these errors were encountered:
@san4d you have access to the bucket name via args passed into to transform.policy. We also recently added a helper function sst.aws.iamEdit to help w/ manipulating the IAM policy. You can
Problem
I'm working with an S3 bucket (
sst.aws.Bucket
) that I'd like to add server-side encryption to with a customer managed key. As part of that work, I want to require KMS encryption on all objects in the bucket based on this documentation from AWS.The policy needs to end up like this:
Because the SST S3 creates a policy automatically and buckets cannot have more than one policy I tried to use transforms to adjust the policy. However, the policy transform does not have access to the bucket's ARN, which I need.
Ideas
BucketCorsArgs
that can be pushed to the internal statements array before creating the policy document.The text was updated successfully, but these errors were encountered: