You can use Amazon CloudWatch Logs to monitor, store, and access log files that your resources in various AWS services generate. For more information, see Amazon CloudWatch Logs User Guide.
AWS App Runner collects the output of your application deployments and of your active service and streams it to CloudWatch Logs. The following sections list App Runner log streams and show you how to view them in the App Runner console.
App Runner log groups and streams
CloudWatch Logs keeps log data in log streams that it further organizes in log groups. A log stream is a sequence of log events from a specific source. A log group is a group of log streams that share the same retention, monitoring, and access control settings.
App Runner defines two CloudWatch Logs log groups, each with multiple log streams, for each App Runner service in your AWS account.
Service logs
The service log group contains logging output generated by App Runner as it manages your App Runner service and acts on it.
Log group name | Example |
---|---|
|
|
Within the service log group, App Runner creates an events log stream to capture activity in the lifecycle of your App Runner service. For example, this might be launching your application or pausing it.
In addition, App Runner creates a log stream for each long-running asynchronous operation that's related to your service. The log stream name reflects the operation type and specific operation ID.
A deployment is a type of operation. Deployment logs contain the logging output of the build and deployment steps that App Runner
performs when you create a service or deploy a new version of your application. Deployment log stream names start with deployment/
, and end
with the ID of the operation that performs the deployment. This operation is either a CreateService call for the initial application deployment or a StartDeployment call
for each further deployment.
Within a deployment log, each log message starts with a prefix:
-
[AppRunner]
– Output that App Runner generates during the deployment. -
[Build]
– Output of your own build scripts.
Log stream name | Example |
---|---|
|
N/A (fixed name) |
|
|
Application logs
The application log group contains the output of your running application code.
Log group name | Example |
---|---|
|
|
Within the application log group, App Runner creates a log stream for each instance (scaling unit) that's running your application.
Log stream name | Example |
---|---|
|
|
Viewing App Runner logs in the console
The App Runner console displays a summary of all logs for your service and allows you to view, explore, and download them.
To view logs for your service
-
Open the App Runner console
, and in the Regions list, select your AWS Region. -
In the navigation pane, choose Services, and then choose your App Runner service.
The console displays the service dashboard with a Service overview.
-
On the service dashboard page, choose the Logs tab.
The console displays a few types of logs in several sections:
-
Event log – Activity in the lifecycle of your App Runner service. The console displays the latest events.
-
Deployment logs – Source repository deployments to your App Runner service. The console displays a separate log stream for each deployment.
-
Application logs – The output of the web application that's deployed to your App Runner service. The console combines the output from all running instances into a single log stream.
-
-
To find specific deployments, scope down the deployment log list by entering a search term. You can search for any value that appears in the table.
-
To view a log's content, choose View full log (event log) or the log stream name (deployment and application logs).
-
Choose Download to download a log. For a deployment log stream, select a log stream first.
-
Choose View in CloudWatch to open the CloudWatch console and use its full capabilities to explore your App Runner service logs. For a deployment log stream, select a log stream first.
Note
The CloudWatch console is particularly useful if you want to view application logs of specific instances instead of the combined application log.