Lucyna is a library that tries to help you with your daily tasks with AWS ECS and AWS Lambda (more might come in future).
- Listing of all services
- Dashboard, which includes
CPUUtilization
andMemoryUtilization
plots for service (refreshed automatically)
- Run task, returns information about ran task, e.g. logs output from it (refreshed automatically)
- Listing of all running tasks
- Show single task, displays information about running task (refreshed automatically)
- Show task's logs (refreshed automatically)
- Listing of all lambdas
More detailed information about available commands below.
pip install lucyna
lucyna
# with aws-vault
aws-vault exec my-aws-profile -- lucyna
# build image
docker build -t lucyna
docker run -it --rm --name lucyna lucyna ecs
# with aws-vault
docker run -it --rm --env-file <(aws-vault exec my-aws-profile -- env | grep "^AWS_") --name lucyna lucyna ecs
lucyna ecs cluster list
lucyna ecs service list [OPTIONS]
Options:
-c, --cluster TEXT
lucyna ecs service dashboard [OPTIONS] SERVICE
Options:
-c, --cluster TEXT
lucyna ecs task run [OPTIONS] TASK_DEFINITION [COMMAND]...
Options:
-c, --cluster TEXT
--network-configuration TEXT
--capacity-provider-strategy TEXT
TASK_DEFINITION
- you can either provide full definition e.g. my-definition:123
or just name, my-definition
. If no number is provided, latest version is assumed.
[COMMAND]
- any command that should be executed on ECS task
Examples:
Running with Fargate
lucyna ecs task run epsy-dynks --capacity-provider-strategy '{"capacityProvider": "FARGATE"}' --network-configuration '{"awsvpcConfiguration":{"subnets":["subnet-1234567890"],"securityGroups":["sg-123456789"],"assignPublicIp":"DISABLED"}}' -- my_command subcommand --one-option --another-option="test"
lucyna ecs task list [OPTIONS]
Options:
-c, --cluster TEXT
lucyna ecs task show [OPTIONS] TASK_ID
Options:
-c, --cluster TEXT
lucyna ecs task logs [OPTIONS] TASK_ID
Options:
-c, --cluster TEXT
lucyna lambda list [OPTIONS]
Options:
--region TEXT Region e.g. us-east-2
Yes! All commands results (but dashboards) can be filtered with grep