[apigatewayv2] Allow configuring access logging
See original GitHub issueCurrently there’s no way on the HttpApi or HttpStage construct to enable access logging as specified via https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html.
This is pretty easy to setup via sam but there’s no equivalent atm for cdk.
Use Case
Enable access logs for HttpApi
Proposed Solution
- Implement AccessLogSettings on HttpStage
- Add
logging
prop to HttpApi which enables logging for all routes
I also think when the above is added to HttpApi that it should create its own log group and the permissions necessary for the HttpApi to write to it.
Other
- 👋 I may be able to implement this feature request
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 3 years ago
- Reactions:66
- Comments:18 (1 by maintainers)
Top Results From Across the Web
AWS::ApiGatewayV2::Stage AccessLogSettings
Settings for logging access in a stage. ... AWS::ApiGatewayV2::Stage AccessLogSettings ... This parameter is required to enable access logging.
Read more >The Missing Guide to AWS API Gateway Access Logs
Basic access log configuration (Or: How do I get started?) ... To allow your API Gateway to write to a CloudWatch Logs log...
Read more >Configuring logging for an HTTP API - Amazon API Gateway
Ensure that your IAM user has the required permissions to enable logging. Create a CloudWatch Logs log group. Provide the ARN of the...
Read more >Ensure API Gateway V2 has Access Logging enabled
On the Logs/Tracing tab, under CloudWatch Settings, do the following to enable execution logging. Select the Enable CloudWatch Logs check box. For Log...
Read more >enable-access-logging - Aqua Security
API Gateway stages should have access log settings block configured to track ... Type: AWS::ApiGatewayV2::Api BadApiStage: Type: AWS::ApiGatewayV2::Stage ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jumpinjan this is how I got it to work, if that’s helpful.
@ltearno it does indeed work!
Much thanks!
Also you unlocked L1 hacking for me - megathanks for that.