首页 > 解决方案 > PowerShell 和命令提示符为 --exclude 和 --include (AWS) 返回未知选项错误

问题描述

我正在尝试在 AWS CLI 中搜索字符串,但排除特定文件类型以将结果缩小到我正在寻找的文件类型,但无论我尝试迭代,PowerShell 和命令提示符都会给出我同样的错误信息。

aws s3api list-objects --bucket mybucket --query "Contents[?contains(Key, 'searchtext')]" --exclude " " --include " .pdf"

编辑:运行 aws s3api list-objects --bucket mybucket --query "Contents[?contains(Key, 'searchtext')]" 工作得很好

标签: amazon-web-servicespowershellcommand-line-interface

解决方案


推荐阅读