You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为何执行aws ecs describe-clusters命令无法查看集群详情?

Why aws ecs describe-clusters can't find your ECS cluster (even though it shows up in the console)?

Let's break down the most common reasons and fixes for this mismatch:

1. Your AWS CLI is targeting a different region than the console

The console shows your cluster in us-east-2, but your AWS CLI might be configured to use a different default region.

  • Check your current CLI region with:
    aws configure get region
    
  • If it's not us-east-2, either update your default config with aws configure (set region to us-east-2), or explicitly specify the region in your command:
    aws ecs describe-clusters --region us-east-2
    

2. You're referencing the wrong cluster name/ARN

The error mentions the default cluster is missing, but maybe the cluster you see in the console has a different name.

  • First, list all clusters in your target region to confirm the actual names/ARNs:
    aws ecs list-clusters --region us-east-2
    
  • Then use the correct cluster name/ARN in your describe command:
    aws ecs describe-clusters --clusters your-cluster-name --region us-east-2
    

3. The IAM identity used by your CLI lacks permissions

You might be using a different IAM user/role in the CLI compared to the AWS console. The console's identity has access to view clusters, but the CLI's identity doesn't have the ecs:DescribeClusters permission.

  • Check which identity your CLI is using:
    aws sts get-caller-identity
    
  • Verify that this IAM entity has a policy that allows the ecs:DescribeClusters action (either for all clusters or your specific cluster ARN).

4. Rare case: AWS CLI cache or service inconsistency

Occasionally, temporary caching or service delays can cause this. Try:

  • Re-running the command with the --no-cli-pager flag (to avoid any pager-related issues)
  • Clearing the AWS CLI cache (delete the ~/.aws/cli/cache directory if you're on Linux/macOS, or the equivalent on Windows)

内容的提问来源于stack exchange,提问作者Jon Sud

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 09:02:52