ECS Setup
Use this skill when datus ecs is installed but has no configured environment.
Config structure
Profiles live under agent.plugins.ecs.<profile> in the config file named by
the ## Plugins section of the system prompt:
agent:
plugins:
ecs:
prod:
default: true
region: us-east-1
cluster: prod-cluster # optional default cluster
log_group: /ecs/prod # optional; awslogs group for `tasks logs`
# credentials — omit to use the standard AWS chain, otherwise any of:
profile: my-aws-profile
role_arn: arn:aws:iam::123456789012:role/datus-ecs
# access_key_id / secret_access_key — use ${VAR} refs
Steps
- Ask for
region, optionally a defaultcluster, and thelog_groupif the user wantstasks logs(the awslogs group the task definition writes to). - The principal needs
ecs:List*,ecs:Describe*,ecs:UpdateService,ecs:RunTask,ecs:StopTask,iam:PassRole(for the task/execution roles), andlogs:GetLogEventsfortasks logs. - Write the profile into the config file named in the
## Pluginspreamble; mark the first profiledefault: true. - Verify with
datus ecs clusters list.
Troubleshooting
no cluster— pass the cluster or setclusterin the profile.no log_group configured— setlog_groupto read task logs.- Fargate
runfails with a networking error — pass--subnet(awsvpc mode requires subnets and usually security groups).