Total Pageviews

2024/02/07

AWS CloudShell 無法成功執行指令

Problem

我在 CloudShell 執行以下指令,卻無法正常執行

aws cognito-identity set-identity-pool-roles \
--identity-pool-id "us-east-1:xxxx-xxxx-xxxx-xxxx-xxxxxx” \
--roles unauthenticated=arn:aws:iam::xxxx:role/Cognito_DynamoPoolUnauth --output json


Root Cause

第二行的第二個 double quote 有打錯

aws cognito-identity set-identity-pool-roles \
--identity-pool-id "us-east-1:xxxx-xxxx-xxxx-xxxx-xxxxxx \
--roles unauthenticated=arn:aws:iam::xxxx:role/Cognito_DynamoPoolUnauth --output json


How-To

修正為正確的 double quote 後即可正常執行

aws cognito-identity set-identity-pool-roles \
--identity-pool-id "us-east-1:xxxx-xxxx-xxxx-xxxx-xxxxxx" \
--roles unauthenticated=arn:aws:iam::xxxx:role/Cognito_DynamoPoolUnauth --output json


No comments: