By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Are APIGW DataTraceEnabled and LoggingLevel settings exclusive of each other?

0

Are APIGW DataTraceEnabled and LoggingLevel exclusive of each other? In other words, if DataTraceEnabled=true and LoggingLevel=OFF is data tracing still on?

2 Answers
1

DataTraceEnabled and LoggingLevel settings in Amazon API Gateway are not mutually exclusive. They serve different purposes and can be configured independently.

DataTraceEnabled is specifically for enabling data trace logging, which can be useful for troubleshooting APIs but may result in logging sensitive data. This setting affects the log entries that are pushed to Amazon CloudWatch Logs.

LoggingLevel, on the other hand, controls the general logging level for the API method. It can be set to OFF, ERROR, or INFO.

If DataTraceEnabled is set to true and LoggingLevel is set to OFF, data tracing will still be on. The DataTraceEnabled setting takes precedence over the LoggingLevel setting for data trace logging specifically.

However, it's important to note that while data tracing will be active, the general logging controlled by LoggingLevel will be turned off. This means you'll get the detailed data trace logs, but you won't receive the standard logs that would be generated at the ERROR or INFO levels.

Keep in mind that enabling data trace logging can have implications for performance and cost, especially in production environments, due to the volume of data it can generate. It's generally recommended to use this feature judiciously, particularly for troubleshooting purposes, and to be cautious about enabling it in production settings where sensitive data might be logged.

Sources
AwsApiGatewayV2RouteSettings - AWS Security Hub
MethodSetting - Amazon API Gateway

profile picture
answered 12 days ago
profile picture
EXPERT
reviewed 12 days ago
0
Accepted Answer

The answer provided by AI is incorrect based on my testing. I ended up testing this myself today and the answer is when DataTraceEnabled=true and LoggingLevel=OFF data tracing is not enabled.

answered 12 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions