Can I access fargate's container?
In local, I was able to connect to the container through the docker exec command.
However, fargate is a serverless service, so I wonder if it can connect to the container.
You cannot access the host in Fargate and run
docker exec from there.
However, you can enable ECS Command Execution in your task/service definition and then use the command
aws ecs execute command which is going to have the same effect.
I can't recommend more to configure your cluster logging settings to log these exec commands so that you can audit when your users ran commands and see what these are (and their outputs).
Activating it is rather simple, but if you want something that will take care of creating the task definitions and possibly the cluster for you, look at x-cluster and x-ecs.EnableExecuteCommand which will create the CFN templates for you.
If you are using an existing cluster and these settings are set for command logging, compose-x will automatically detect that and configure IAM permissions accordingly.
Hope this helps,
How to configure subnets for an ECS cluster so it can access a database in the same VPC?asked 3 months ago
How to access container from another containerasked 9 months ago
How can I get logs of my task failed containerAccepted Answerasked a month ago
Can I attach Lightsail disk to a Lightsailt container?Accepted Answerasked 5 months ago
Lightsail container - connect to ElastiCacheasked 4 months ago
Which role do I have to use for the Fargate tasks on AWS Batch?Accepted Answerasked 6 months ago
Can i access to Fargate windows containers?Accepted Answerasked 4 months ago
Can I access fargate's container?Accepted Answerasked 2 months ago
Wordpress in Docker container on Fargateasked 3 months ago
If I have enabled sensitive redaction data on Contact Lens, am I still able to listen to the unredacted audio through the console?asked 2 months ago