Skip to content

Commit 855e81d

Browse files
author
Bob Strahan
committed
Conditiionally add custom model arns to lambda policies
1 parent 4aaace4 commit 855e81d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

patterns/pattern-2/template.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@ Resources:
672672
Resource:
673673
- !Sub "arn:aws:bedrock:*::foundation-model/*"
674674
- !Sub "arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:inference-profile/*"
675+
- !If
676+
- HasCustomClassificationModelARN
677+
- !Ref CustomClassificationModelARN
678+
- !Ref AWS::NoValue
675679
- !If
676680
- HasGuardrailConfig
677681
- Effect: Allow
@@ -750,6 +754,10 @@ Resources:
750754
Resource:
751755
- !Sub "arn:aws:bedrock:*::foundation-model/*"
752756
- !Sub "arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:inference-profile/*"
757+
- !If
758+
- HasCustomExtractionModelARN
759+
- !Ref CustomExtractionModelARN
760+
- !Ref AWS::NoValue
753761
- !If
754762
- HasGuardrailConfig
755763
- Effect: Allow

0 commit comments

Comments
 (0)