'Amazon CloudWatch: How to find ARN of CloudWatch Log group
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?
Solution 1:[1]
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 2:[2]
Solution 3:[3]
You can also use AWS CLI
aws logs describe-log-groups | grep <log_group_name> | awk '/arn/'
Solution 4:[4]
Solution 5:[5]
Or you could do a aws logs describe-log-groups | grep <name_of_group>
That works too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | holm50 |
| Solution 2 | Das_Geek |
| Solution 3 | Surya Prakash Patel |
| Solution 4 | harrolee |
| Solution 5 | krystan honour |



