Skip to content

Lucyna is a library that tries to help you with your daily tasks with AWS ECS and AWS Lambda (more might come in future).

License

Notifications You must be signed in to change notification settings

epsylabs/lucyna

Repository files navigation

Lucyna

PyPI

Lucyna is a library that tries to help you with your daily tasks with AWS ECS and AWS Lambda (more might come in future).

Screenshots

Dashboard Cluster listing Services list

Summary of functionalities

ECS

Cluster

Service

Task

  • 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)

Lambda

  • Listing of all lambdas

More detailed information about available commands below.

Installation & usage

As python package

pip install lucyna

lucyna

# with aws-vault
aws-vault exec my-aws-profile -- lucyna 

With docker

# 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

What lucyna can do?

ECS

Cluster

List of available clusters

lucyna ecs cluster list

Service

List of available services

lucyna ecs service list [OPTIONS]

Options:
  -c, --cluster TEXT

Dashboard for service

lucyna ecs service dashboard [OPTIONS] SERVICE

Options:
  -c, --cluster TEXT

Task

Run task

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"

List of running tasks

lucyna ecs task list [OPTIONS]

Options:
  -c, --cluster TEXT

Display information about ran task

lucyna ecs task show [OPTIONS] TASK_ID

Options:
  -c, --cluster TEXT

Display task logs

lucyna ecs task logs [OPTIONS] TASK_ID

Options:
  -c, --cluster TEXT

Lambda

List of available lambdas

lucyna lambda list [OPTIONS]

Options:
  --region TEXT  Region e.g. us-east-2

Can I use grep?

Yes! All commands results (but dashboards) can be filtered with grep

About

Lucyna is a library that tries to help you with your daily tasks with AWS ECS and AWS Lambda (more might come in future).

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published