Overview
In an AWS ECS Fargate environment, Aembit Edge Components (Agent Controller and Agent Proxy) operate as serverless containers. Logs are not stored locally; instead, they are streamed to Amazon CloudWatch Logs. This article details how to locate, retrieve, and increase the verbosity of these logs for troubleshooting.
Relates To
Deployment Type: AWS ECS Fargate
Logging Driver:
awslogsInfrastructure Tooling: Terraform, AWS Management Console
Cause (Symptom)
Use this guide if:
The Agent Controller service fails to reach a
Steady Statein ECS.The Agent Proxy is failing its health check within your Workload Task.
Solution
1. Locate Logs in CloudWatch By default, the Aembit Terraform module creates or utilizes a specific log group.
Default Log Group Name:
/aembit/edge(unless overridden via thelog_group_namevariable).Navigation: 1. Log into the AWS Management Console. 2. Navigate to CloudWatch > Logs > Log Groups. 3. Search for
/aembit/edgeor your custom log group name.
2. Identify the Log Stream Within the log group, logs are separated by Log Streams.
Agent Controller Logs: Search for streams prefixed with your
ecs_service_prefix(default:aembit_).Agent Proxy Logs: These are found within the log group associated with your Client Workload Task Definition.
3. Increasing Verbosity (Debug Mode) If the standard logs do not provide enough detail, you can increase the log level by updating your Terraform configuration and redeploying.
Add the following to your aembit-ecs module:
Terraform
module "aembit-ecs" {
source = "Aembit/ecs/aembit"
# ... other variables ...
agent_controller_environment_variables = {
"AEMBIT_LOG_LEVEL": "debug"
}
agent_proxy_environment_variables = {
"AEMBIT_LOG_LEVEL": "debug"
}
}