Add support for configuring/viewing API Gateway logs
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
While chalice can support retrieving logs from lambda via the `chalice logs` command, it's not possible to retrieve logs for API gateway. Additionally, creating a lambda function automatically creates a log group for you so there's nothing you need to do to configure logs.
It would be helpful to also have this same functionality for API gateway. This needs to be explicitly configured when creating your rest API. The other issue I remember running into is that you set a role that API gateway uses to push logs to cloudwatch, but this role is for your entire account. It's not clear to what extent chalice should set this up for you. You need a role configured or else you don't get APIG logs, but it may already be configured. We probably will need to add a few config options for the various use cases.
Originally requested in https://github.com/aws/chalice/issues/841#issuecomment-389747973
Contributor guide
Research direction
Start with the existing `chalice logs` command and the REST API creation flow described in the issue. Determine the required API Gateway and CloudWatch logging configuration and role-handling behavior; done means API Gateway logs can be configured and retrieved while existing Lambda log support remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- api, cloud, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100