-
Notifications
You must be signed in to change notification settings - Fork 2
Running Rails Console for ECS
If you want to run any shell commands on an Amazon Cluster you are going to need AmazonCLI and JQ installed on your workstation. Then you can run
The way to successfully do this is to use Amazone ECS Exec: https://aws.amazon.com/blogs/containers/new-using-amazon-ecs-exec-access-your-containers-fargate-ec2/
https://docs.aws.amazon.com/AmazonECS/latest/userguide/ecs-exec.html
Syntax: aws ecs execute-command --region us-east-2 --cluster <cluster_name> --task <task_id> --container <container_name> --command "rails c" --interactive
To get our cluster_name, task_id, and container_name see our config vault. https://github.com/uclibs/config_vault
If you have any problems then you can use Amazon ECS Exec checker to confirm dependencies.
https://github.com/aws-containers/amazon-ecs-exec-checker
Things that have to be configured for your AWS account are