Skip to content

Commit 68fd8ac

Browse files
author
Bob Strahan
committed
Add KMS permissions to BedrockKB S3VectorManagerRole for customer-managed encryption keys
1 parent 0254889 commit 68fd8ac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

options/bedrockkb/template.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,21 @@ Resources:
422422
Action:
423423
- iam:PassRole
424424
Resource: !Sub "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/*"
425+
- !If
426+
- IsCustomerManagedKey
427+
- PolicyName: KMSAccess
428+
PolicyDocument:
429+
Version: '2012-10-17'
430+
Statement:
431+
- Effect: Allow
432+
Action:
433+
- kms:Encrypt
434+
- kms:Decrypt
435+
- kms:ReEncrypt*
436+
- kms:GenerateDataKey*
437+
- kms:DescribeKey
438+
Resource: !Ref pCustomerManagedEncryptionKeyArn
439+
- !Ref "AWS::NoValue"
425440

426441
S3VectorManagerFunction:
427442
Type: AWS::Serverless::Function

0 commit comments

Comments
 (0)