首页 > 解决方案 > 尝试通过 CLI 标记 Amazon FSx 时遇到问题

问题描述

因此,我尝试在 Amazon FSx 中标记我们的第一个文件系统。

但是,这只能通过我正在使用的 AmazonCLI Access 来完成。但是,每次我尝试标记这个时,我似乎都会遇到同样的问题。

我在 CLI 中尝试了一些查询,下面是我收到的输出。

PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell> aws fsx tag-resource --resource-arn arn:aws:fsx:eu-central-1:********:key/ ********* --tags "Key=Application Value=Nexus" --profile *******

调用 TagResource 操作时发生错误 (BadRequest):作为输入提供的 Null 值 PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell> aws fsx tag-resource --resource-arn arn:aws:fsx: eu-central-1:********:key/******* --tags "Key=Application Value=Nexus" --profile *********

调用 TagResource 操作时发生错误 (BadRequest):作为输入提供的 Null 值 PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell> aws fsx tag-resource --resource-arn fs-**** ***** 键=应用价值=Nexus" --profile *********

调用 TagResource 操作时发生错误 (AccessDeniedException):用户:arn:aws:sts::*******:assumed-role/**-********/***** *@*****.com 无权执行:fsx:TagResource on resource: fs-***********

我希望这会获取 key:value 并标记它,但是我收到了很多错误消息。

我有 Amazon FSX 完全管理 IAM 政策!所以这个 TagResource 操作不应该发生。我还刺激了该政策,它说它应该可以正常工作。

标签: amazon-web-servicesaws-cli

解决方案


所以我现在设法解决了这个问题

这是由于 ARN 的格式:

这是需要使用的 --resource-arn 格式。

arn:aws:fsx:region:accountnumber:file-system/fs-********```


推荐阅读