TL;DR
Add this to your logback.xml to disable debug logging from the AWS SDK:
<logger name="software.amazon.awssdk" level="INFO" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
If you are using Spring Boot, you may also be using logback-spring.xml. The idea is the same.
Example logs
You may see logs similar to these in your console when using the AWS SDK:
2026-06-30T12:36:09.031+03:00 DEBUG 1 --- [nio-8080-exec-2] s.a.a.c.i.ExecutionInterceptorChain :
Interceptor 'software.amazon.awssdk.services.s3.internal.handlers.EnableTrailingChecksumInterceptor@2fc2ad37'
modified the message with its modifyHttpRequest method.
2026-06-30T12:36:09.059+03:00 DEBUG 1 --- [nio-8080-exec-2] s.a.awssdk.retries.LegacyRetryStrategy :
Request attempt 1 token acquired. backoff: 0ms, cost: 0, capacity: 500/500.
2026-06-30T12:36:09.061+03:00 DEBUG 1 --- [nio-8080-exec-2] software.amazon.awssdk.request :
Sending Request: DefaultSdkHttpFullRequest(
httpMethod=PUT,
protocol=https,
host=my-bucket.s3.eu-central-1.amazonaws.com,
encodedPath=/uploads/example-object.webp,
headers=[
Content-Type,
User-Agent,
amz-sdk-invocation-id,
amz-sdk-request,
x-amz-checksum-crc32,
x-amz-content-sha256,
x-amz-date,
x-amz-sdk-checksum-algorithm
]
)
2026-06-30T12:36:09.184+03:00 DEBUG 1 --- [nio-8080-exec-2] software.amazon.awssdk.request :
Received successful response: 200 OK, Request ID: 8A1B2C3D4E5F6G7H, Extended Request ID: <redacted>.
2026-06-30T12:36:09.185+03:00 DEBUG 1 --- [nio-8080-exec-2] s.a.awssdk.retries.LegacyRetryStrategy :
Request attempt 1 succeeded. No retry needed.
At first, this might seem fine if your application does not perform many AWS operations. For me, it became a problem when a data archiving job uploaded around 100k objects to S3 each night.
Each upload produced around 20 log lines. Quick math: that is about 2 million log lines through the night, only from uploading objects to S3.
Disable the logs
To disable DEBUG level logs from the AWS SDK, bump the AWS SDK logger level in your logback.xml configuration:
<logger name="software.amazon.awssdk" level="INFO" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
I changed the level to INFO, and that was enough for my case. If you want fewer logs, you can also increase the level further.
Warnings and errors only
<logger name="software.amazon.awssdk" level="WARN" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
Errors only
<logger name="software.amazon.awssdk" level="ERROR" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
Make sure to change the ref value to match your appender name.
For example, if your appender is called CONSOLE, use:
<logger name="software.amazon.awssdk" level="INFO" additivity="false">
<appender-ref ref="CONSOLE" />
</logger>
Which logger names matter?
The main logger names I would configure are:
-
software.amazon.awssdk- The broad AWS SDK logger. Use this if you want to reduce most AWS SDK logs at once.
-
software.amazon.awssdk.request- Logs outgoing requests and incoming responses. This is usually one of the noisiest loggers.
-
software.amazon.awssdk.retries- Logs retry strategy details, request attempts, backoff, and retry capacity.
-
software.amazon.awssdk.core.interceptor- Logs execution interceptor details, such as request modifications before sending.
Final notes
By doing this, I saved a lot of space in my log files and made the application logs much easier to read.
If you found this article useful, consider visiting my blog. In the future, I will be posting more tutorials and learning experiences from my developer journey.
Top comments (0)