DEV Community

Cover image for How to Disable AWS SDK Debug Logs in Spring Boot Logback
stitas
stitas

Posted on • Edited on • Originally published at stitas.dev

How to Disable AWS SDK Debug Logs in Spring Boot Logback

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>
Enter fullscreen mode Exit fullscreen mode

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.
Enter fullscreen mode Exit fullscreen mode
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.
Enter fullscreen mode Exit fullscreen mode
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
    ]
)
Enter fullscreen mode Exit fullscreen mode
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>.
Enter fullscreen mode Exit fullscreen mode
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.
Enter fullscreen mode Exit fullscreen mode

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>
Enter fullscreen mode Exit fullscreen mode

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>
Enter fullscreen mode Exit fullscreen mode

Errors only

<logger name="software.amazon.awssdk" level="ERROR" additivity="false">
    <appender-ref ref="STDOUT" />
</logger>
Enter fullscreen mode Exit fullscreen mode

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>
Enter fullscreen mode Exit fullscreen mode

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)