TipsCloud TipsLog Groups

Using AWS Cloudwatch Log Groups

Flightcontrol sets up AWS CloudWatch log groups for each Flightcontrol service (web server or worker). You can monitor (or tail) your logs using the AWS Command Line Interface (CLI), or the AWS Console.

You could also do anything else you can do with AWS CloudWatch logs, such as set up alarms, or export the logs to another service.

Finding the Log Group Name

Flightcontrol provides a Runtime Logs button on any successfully deployed and running service that will take you to the AWS Console page for the log group.

The log group name is at the top of the page.

CloudWatch > Log groups > /ecs/web-api-gjd1oheTaskDefinition

Runtime logs will always start with /ecs/ and end with TaskDefinition.

Tailing the Logs

From the AWS Console, you can tail the logs by clicking the Start tailing button.

You can also use the Amazon Command Line Interface (CLI) to tail the logs. You will need to setup and configure the AWS CLI first.

Using the log group name, you can tail the logs using the AWS CLI with the following command:

aws logs tail <log group> --region us-west-2

You will need to specify the AWS region as an argument, if your default AWS region for the command line tool is not the same region as the service.

In addition, the AWS credentials you use with the AWS command line tool need to have access to the CloudWatch logs - this would have to be addressed with an AWS IAM policy if you are not able to tail the logs.