Amazon CloudWatch: How to find ARN of CloudWatch Log group

20,307

Solution 1

Go to Cloudwatch logs, find your log group, open it and you'll see a list of log streams. There is settings icon on top right: enter image description here

Click it and you'll see an option to show stream arn:

enter image description here

Save the settings and you'll see stream arns. The part before semicolon looks like Log Group arn

Solution 2

The CloudWatch Group ARN format is arn:aws:logs:{region}:{account-id}:log-group:API-Gateway-Execution-Logs_{rest-api-id}/{stage-name}, cf. https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html

Solution 3

arn:aws:logs:region:account-id:log-group:log_group_name

See this documentation

Solution 4

You can also use AWS CLI

aws logs describe-log-groups | grep <log_group_name> | awk '/arn/'

Solution 5

2022 Update

Select your log group:

enter image description here

Click Log Group Details:

enter image description here

Copy the ARN:

enter image description here

Share:
20,307
Hleb Kastseika
Author by

Hleb Kastseika

Updated on July 05, 2022

Comments

  • Hleb Kastseika
    Hleb Kastseika almost 2 years

    I configure Custom Access Logging for Amazon API Gateway and I need to specify CloudWatch Group name, but when I put these just name of log group in format like "API-Gateway-Execution-Logs_3j5w5m7kv9/stage-name" I get such error:

    Invalid ARN specified in the request. ARNs must start with 'arn:': API-Gateway-Execution-Logs_3j5w5m7kv9/stage-name

    When I open page of this log group in CloudWatch I just see the same name there and don't see ARN value. How can I find it?