5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ナレッジベースへ追加する際のファイル名は日本語NG

Posted at

はじめに

Qiita初投稿です。

AWS Bedrockのナレッジベースにファイルを追加しようとした際にエラーが出て少し躓きました。

同様のエラーが出た際のご参考になれば幸いです。

また、もし他にも回避方法あればコメント欄にて教えていただけますと幸いです。

事象

エラー

AWS Bedrockのナレッジベースより、データソースを追加しようとしたら以下のエラーが出ました。

エラーメッセージ

Error
[InvalidInputException] There were problems with the supplied replacements: [Validation error detected: Value {bucketAndKeyPrefix=[略]/テスト_S3からナレッジベース.pdf.metadata.json} at "policyMultiValueReplacements" failed to satisfy constraint: Member must satisfy regular expression pattern: [\u0009\u000A\u000D\u0020-\u007E\u00A1-\u00FF]+, Validation error detected: Value {bucketAndKeyPrefix=<略>/テスト_S3からナレッジベース.pdf} at "policyMultiValueReplacements" failed to satisfy constraint: Member must satisfy regular expression pattern: [\u0009\u000A\u000D\u0020-\u007E\u00A1-\u00FF]+]

(一部(S3のパスを)省略しています)

スクリーンショット

2スクリーンショット 2025-07-15 115431.jpg

原因

ファイル名に日本語が含まれていることが原因でした。

対処

ファイル名を日本語が含まれないようにS3側を変更することで追加できるようになりました。

補足

ファイル名ではなく、ファイルの内容自体に日本語が含まれることはOKです。
データソースの追加はもちろん検索も動作します。
(この投稿では詳しくは割愛します)

5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?