@@ -482,7 +482,7 @@ Resources:
482482 MetadataConfiguration :
483483 nonFilterableMetadataKeys :
484484 - " AMAZON_BEDROCK_METADATA"
485- - " AMAZON_BEDROCK_TEXT_CHUNK "
485+ - " AMAZON_BEDROCK_TEXT "
486486
487487 #
488488 # OpenSearch Serverless resources (only when using OpenSearch)
@@ -732,16 +732,20 @@ Resources:
732732 Effect : Allow
733733 Action :
734734 - s3:ListBucket
735- Resource :
736- - !Sub " arn:${AWS::Partition}:s3:::${pKnowledgeBaseBucketName}"
737- - !GetAtt S3VectorBucketAndIndex.BucketArn
735+ Resource : !If
736+ - UseS3Vectors
737+ - - !Sub "arn:${AWS::Partition}:s3:::${pKnowledgeBaseBucketName}"
738+ - !GetAtt S3VectorBucketAndIndex.BucketArn
739+ - - !Sub "arn:${AWS::Partition}:s3:::${pKnowledgeBaseBucketName}"
738740 - Sid : S3GetObject
739741 Effect : Allow
740742 Action :
741743 - s3:GetObject
742- Resource :
743- - !Sub " arn:${AWS::Partition}:s3:::${pKnowledgeBaseBucketName}/*"
744- - !GetAtt S3VectorBucketAndIndex.BucketArn
744+ Resource : !If
745+ - UseS3Vectors
746+ - - !Sub "arn:${AWS::Partition}:s3:::${pKnowledgeBaseBucketName}/*"
747+ - !GetAtt S3VectorBucketAndIndex.BucketArn
748+ - - !Sub "arn:${AWS::Partition}:s3:::${pKnowledgeBaseBucketName}/*"
745749 - !Ref " AWS::NoValue"
746750 - !If
747751 - IsCustomerManagedKey
@@ -1081,7 +1085,10 @@ Outputs:
10811085 Description : S3 Vector bucket name (S3 Vectors only)
10821086 S3VectorBucketArn :
10831087 Condition : UseS3Vectors
1084- Value : !GetAtt S3VectorBucketAndIndex.BucketArn
1088+ Value : !If
1089+ - UseS3Vectors
1090+ - !GetAtt S3VectorBucketAndIndex.BucketArn
1091+ - " "
10851092 Description : S3 Vector bucket ARN (S3 Vectors only)
10861093 OpenSearchCollectionName :
10871094 Condition : UseOpenSearchServerless
0 commit comments