Skip to content

logs

CloudWatch Logs without the console scavenger hunt.

bash
awsutopia logs <name-or-group> [--since 1h] [--follow] [--json] [--dry-run]

What you'll get

Recent log events for a group. Short names try /aws/lambda/{name}; with a project file, logs hello also looks for /aws/lambda/utopia-{project}-{env}-hello.

bash
awsutopia logs hello --since 1h
awsutopia logs /aws/lambda/utopia-demo-dev-hello --since 30m --follow
awsutopia logs hello --since 1h --json
Arg / flagDescription
name-or-group (positional)Full group (/aws/lambda/…) or short fn name (hello)
--sinceLookback (30m, 1h, …) — default 1h
--follow / -fPoll until Ctrl+C
--json{ logGroupName, events: [{ timestamp, message, … }] }
--dry-runPlan only — no CloudWatch calls

Missing group → exit 4 (LOG_GROUP_NOT_FOUND). Read-only: needs logs:DescribeLogGroups and logs:FilterLogEvents. See IAM.

Working name — your AWS account, your bill.