Read only commands AWS
Jump to navigation
Jump to search
Cost Overview (Cost Explorer)[edit]
Total cost[edit]
aws ce get-cost-and-usage \ --time-period Start=2026-06-01,End=2026-07-01 \ --granularity MONTHLY \ --metrics UnblendedCost Cost by service (key view) aws ce get-cost-and-usage \ --time-period Start=2026-06-01,End=2026-07-01 \ --granularity MONTHLY \ --metrics UnblendedCost \ --group-by Type=DIMENSION,Key=SERVICE
👉 This is the most important command to identify ECS-related costs such as:
ECS Clusters & Services[edit]
aws ecs list-clusters List services in a cluster aws ecs list-services \ --cluster <cluster-name> Describe service configuration aws ecs describe-services \ --cluster <cluster-name> \ --services <service-name>
Task Definitions (Rightsizing)[edit]
aws ecs describe-task-definition \ --task-definition <task-definition>
Auto Scaling (ECS Services)[edit]
- Scalable targets
aws application-autoscaling describe-scalable-targets \ --service-namespace ecs
- Scaling policies
aws application-autoscaling describe-scaling-policies \ --service-namespace ecs
CloudWatch Logs[edit]
aws logs describe-log-groups
Amazon ECR (Container Images)[edit]
aws ecr describe-repositories List images in a repository aws ecr list-images \ --repository-name <repository-name>
Load Balancers (ECS Services)[edit]
aws elbv2 describe-load-balancers
NAT Gateways (Hidden ECS Cost Driver)[edit]
aws ec2 describe-nat-gateways
See also[edit]
- AWS Fargate, AWS Fargate Spot,
aws ecs, aws eks, launch_type, versions, AWS Fargate profile,AWS_ECS_TASK_PATCHING_RETIREMENT - Amazon ECS, Service, Tasks (Task overview), capacity providers, Cluster Auto Scaling (CAS),
aws ecs, ecs-cli, ~/.ecs/config, AWS Copilot, AWS Fargate, Fargate Spot, AWS CloudWatch Container Insights,/etc/ecs/ecs.config, Security group (SG), container agent, task definition, Amazon ECS events, best practices, Amazon ECS Exec Checker, Amazon ECS Agent, Service Connect,AWSServiceRoleForECS, Terraform ECS, AWS ECS Rolling deployments,requiresAttributes
Advertising: