arc logs

Retrieve or delete CloudWatch logs for your Lambda functions. When your functions log to stdout or stderr, these messages are stored in AWS CloudWatch. This command lets you access these logs for debugging or monitoring.

You must provide a path to one of your Lambda function directories (e.g., arc logs src/http/get-index). By default, this command retrieves logs from your staging environment, unless the --production flag is specified.

If no function path is provided and your project has a root HTTP handler defined, logs for that handler will be retrieved by default.

Usage

arc logs [flags] <path/to/function>

Flags

  • --destroy: Delete logs for the specified function
  • -p, --production: Retrieve logs from the production environment (default is staging)
  • -v, --verbose: Display more detailed information during command execution
  • -d, --debug: Display even more detailed information for debugging purposes

Examples

Read logs from staging

arc logs src/http/get-index

Read logs from production

arc logs --production src/http/get-index

Delete logs

arc logs --destroy src/http/get-index