SAM HTTP API stages for V1 and V2 should have access logging enabled
API Gateway stages should have access log settings block configured to track all access to a particular stage. This should be applied to both v1 and v2 gateway stages.
Logging provides vital information about access and usage
Follow the appropriate remediation steps below to resolve the issue.
Enable logging for API Gateway stages
---AWSTemplateFormatVersion:"2010-09-09"Description:A sample templateAWSTemplateFormatVersion:2010-09-09Description:Good Example of SAM APIResources:ApiGatewayApi:Type:AWS::Serverless::HttpApiProperties:Name:Good SAM API exampleStageName:ProdTracing:ActiveyAccessLogSetting:DestinationArn:gateway-loggingFormat:json
Aqua Security is the largest pure-play cloud native security company, providing customers the freedom to innovate and run their businesses with minimal friction. The Aqua Cloud Native Security Platform provides prevention, detection, and response automation across the entire application lifecycle to secure the build, secure cloud infrastructure and secure running workloads wherever they are deployed.